From 45f9d64c23e32ed1e5edc1b3880bfe3c7ef5b3ba Mon Sep 17 00:00:00 2001 From: H R X N Date: Thu, 27 Jul 2017 20:40:00 +0200 Subject: [PATCH] Update directlink.py with additional file exts. (#30) Add WebP, still not that common, but it's increasing. Add 3rd JPEG variant (https://en.wikipedia.org/wiki/JPEG#JPEG_filename_extensions) Never seen JFIF in the wild, would probably be overkill. Extend Ogg formats (https://en.wikipedia.org/wiki/Ogg; https://wiki.xiph.org/MIME_Types_and_File_Extensions) --- gallery_dl/extractor/directlink.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery_dl/extractor/directlink.py b/gallery_dl/extractor/directlink.py index 3b6a91d1..f9e8b686 100644 --- a/gallery_dl/extractor/directlink.py +++ b/gallery_dl/extractor/directlink.py @@ -16,7 +16,7 @@ class DirectlinkExtractor(Extractor): """Extractor for direct links to images""" category = "directlink" filename_fmt = "{domain}/{path}" - pattern = [r"https?://([^/]+)/([^?&#]+\.(?:jpe?g|png|gif|webm|mp4|ogg))"] + pattern = [r"https?://([^/]+)/([^?&#]+\.(?:jpe?g?|png|gif|webp|webm|mp4|mkv|ogg|ogm|ogv|opus))"] test = [(("https://photos.smugmug.com/The-World/Hawaii/" "i-SWz2K6n/2/X3/IMG_0311-X3.jpg"), { "url": "32ee1045881e17ef3f13a9958595afa42421ec6c",