Merge pull request #728 from OMEGARAZER/patch-1
fix https://github.com/aliparlakci/bulk-downloader-for-reddit/issues/724
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -65,6 +65,7 @@ def test_factory_lever_good(test_submission_url: str, expected_class: BaseDownlo
|
||||
"https://www.google.com",
|
||||
"https://www.google.com/test",
|
||||
"https://www.google.com/test/",
|
||||
"https://www.tiktok.com/@keriberry.420",
|
||||
),
|
||||
)
|
||||
def test_factory_lever_bad(test_url: str):
|
||||
|
||||
Reference in New Issue
Block a user