Update download_factory.py
Attempt to fix #724 Narrows down characters available to extensions in the regex. Outside of 3 and 4, the only extensions that I can think of this doesn't hit are bz2 and 7z (which wasn't caught before).
This commit is contained in:
parent
8d43cdeef7
commit
b3e4777206
|
@ -30,7 +30,7 @@ class DownloadFactory:
|
|||
return Imgur
|
||||
elif re.match(r"(i\.)?(redgifs|gifdeliverynetwork)", sanitised_url):
|
||||
return Redgifs
|
||||
elif re.match(r".*/.*\.\w{3,4}(\?[\w;&=]*)?$", sanitised_url) and not DownloadFactory.is_web_resource(
|
||||
elif re.match(r".*/.*\.[a-zA-Z34]{3,4}(\?[\w;&=]*)?$", sanitised_url) and not DownloadFactory.is_web_resource(
|
||||
sanitised_url
|
||||
):
|
||||
return Direct
|
||||
|
|
Loading…
Reference in a new issue