Merge pull request #572 from Serene-Arc/enhancement_571
This commit is contained in:
commit
a487320e81
|
@ -33,6 +33,8 @@ class DownloadFactory:
|
||||||
return Erome
|
return Erome
|
||||||
elif re.match(r'reddit\.com/gallery/.*', sanitised_url):
|
elif re.match(r'reddit\.com/gallery/.*', sanitised_url):
|
||||||
return Gallery
|
return Gallery
|
||||||
|
elif re.match(r'patreon\.com.*', sanitised_url):
|
||||||
|
return Gallery
|
||||||
elif re.match(r'gfycat\.', sanitised_url):
|
elif re.match(r'gfycat\.', sanitised_url):
|
||||||
return Gfycat
|
return Gfycat
|
||||||
elif re.match(r'(m\.)?imgur.*', sanitised_url):
|
elif re.match(r'(m\.)?imgur.*', sanitised_url):
|
||||||
|
|
|
@ -47,6 +47,7 @@ from bdfr.site_downloaders.youtube import Youtube
|
||||||
('https://vimeo.com/channels/31259/53576664', YtdlpFallback),
|
('https://vimeo.com/channels/31259/53576664', YtdlpFallback),
|
||||||
('http://video.pbs.org/viralplayer/2365173446/', YtdlpFallback),
|
('http://video.pbs.org/viralplayer/2365173446/', YtdlpFallback),
|
||||||
('https://www.pornhub.com/view_video.php?viewkey=ph5a2ee0461a8d0', PornHub),
|
('https://www.pornhub.com/view_video.php?viewkey=ph5a2ee0461a8d0', PornHub),
|
||||||
|
('https://www.patreon.com/posts/minecart-track-59346560', Gallery),
|
||||||
))
|
))
|
||||||
def test_factory_lever_good(test_submission_url: str, expected_class: BaseDownloader, reddit_instance: praw.Reddit):
|
def test_factory_lever_good(test_submission_url: str, expected_class: BaseDownloader, reddit_instance: praw.Reddit):
|
||||||
result = DownloadFactory.pull_lever(test_submission_url)
|
result = DownloadFactory.pull_lever(test_submission_url)
|
||||||
|
|
|
@ -57,6 +57,14 @@ def test_gallery_get_links(test_ids: list[dict], expected: set[str]):
|
||||||
'65163f685fb28c5b776e0e77122718be',
|
'65163f685fb28c5b776e0e77122718be',
|
||||||
'2a337eb5b13c34d3ca3f51b5db7c13e9',
|
'2a337eb5b13c34d3ca3f51b5db7c13e9',
|
||||||
}),
|
}),
|
||||||
|
('rb3ub6', { # patreon post
|
||||||
|
'748a976c6cedf7ea85b6f90e7cb685c7',
|
||||||
|
'839796d7745e88ced6355504e1f74508',
|
||||||
|
'bcdb740367d0f19f97a77e614b48a42d',
|
||||||
|
'0f230b8c4e5d103d35a773fab9814ec3',
|
||||||
|
'e5192d6cb4f84c4f4a658355310bf0f9',
|
||||||
|
'91cbe172cd8ccbcf049fcea4204eb979',
|
||||||
|
})
|
||||||
))
|
))
|
||||||
def test_gallery_download(test_submission_id: str, expected_hashes: set[str], reddit_instance: praw.Reddit):
|
def test_gallery_download(test_submission_id: str, expected_hashes: set[str], reddit_instance: praw.Reddit):
|
||||||
test_submission = reddit_instance.submission(id=test_submission_id)
|
test_submission = reddit_instance.submission(id=test_submission_id)
|
||||||
|
|
Loading…
Reference in a new issue