Recognize more pictures
This commit is contained in:
parent
1fb73aff91
commit
38f4770a37
|
@ -14,7 +14,7 @@ def shorten(url):
|
|||
IMAGE_URL = dictdata.DictData("image_urls.json")
|
||||
URL = re.compile(r"((?:https?|ftp)://[^\s/$.?#].[^\s]*)")
|
||||
|
||||
image_exts = ".png .jpg .jpeg .gif".split()
|
||||
image_exts = ".png .jpg .jpeg .gif .tif .tiff .bmp .svg .webp".split()
|
||||
def is_image(url):
|
||||
return os.path.splitext(os.path.basename(url))[1] in image_exts
|
||||
|
||||
|
|
Loading…
Reference in New Issue