Fix bug with Imgur gifs being shortened too much
The rstrip function was used wrongly, it doesn't remove a substring but rather removes any of the characters provided, so here it removed any I, G, V, or F that finished the six character ID for Imgur, resulting in a 404 error for the resources in question.
This commit is contained in:
@@ -130,6 +130,12 @@ def test_imgur_extension_validation_bad(test_extension: str):
|
||||
'fb6c913d721c0bbb96aa65d7f560d385',
|
||||
),
|
||||
),
|
||||
(
|
||||
'https://i.imgur.com/lFJai6i.gifv',
|
||||
(
|
||||
'01a6e79a30bec0e644e5da12365d5071',
|
||||
),
|
||||
)
|
||||
))
|
||||
def test_find_resources(test_url: str, expected_hashes: list[str]):
|
||||
mock_download = Mock()
|
||||
|
||||
Reference in New Issue
Block a user