Fix case where Gfycat fails after redirect

This commit is contained in:
Serene-Arc
2021-03-21 20:31:18 +10:00
committed by Ali Parlakci
parent 0d78e16b2d
commit c13f2806fa
2 changed files with 7 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ from bulkredditdownloader.site_downloaders.gfycat import Gfycat
@pytest.mark.parametrize(('test_url', 'expected_url'), (
('https://gfycat.com/definitivecaninecrayfish', 'https://giant.gfycat.com/DefinitiveCanineCrayfish.mp4'),
('https://gfycat.com/dazzlingsilkyiguana', 'https://giant.gfycat.com/DazzlingSilkyIguana.mp4'),
('https://gfycat.com/webbedimpurebutterfly', 'https://thumbs2.redgifs.com/WebbedImpureButterfly.mp4'),
))
def test_get_link(test_url: str, expected_url: str):
result = Gfycat._get_link(test_url)