mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 02:36:44 +00:00
fix ._ files (#907)
This commit is contained in:
@@ -50,7 +50,11 @@ class HTMLStripper(HTMLParser):
|
|||||||
def getImageFileName(imgfile):
|
def getImageFileName(imgfile):
|
||||||
name, ext = os.path.splitext(imgfile)
|
name, ext = os.path.splitext(imgfile)
|
||||||
ext = ext.lower()
|
ext = ext.lower()
|
||||||
if (name.startswith('.') and len(name) == 1) or ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.jp2', '.j2k', '.jpx']:
|
if (name.startswith('.') and len(name) == 1):
|
||||||
|
return None
|
||||||
|
if name.startswith('._'):
|
||||||
|
return None
|
||||||
|
if ext not in ['.png', '.jpg', '.jpeg', '.gif', '.webp', '.jp2', '.j2k', '.jpx']:
|
||||||
return None
|
return None
|
||||||
return [name, ext]
|
return [name, ext]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user