[patreon] fix hash extraction from download URLs (closes #693)
The old method was assuming every URL path ends with '/1'. For URLs where this is not the case, the segment containing the post ID was used as file hash.
This commit is contained in:
@@ -47,7 +47,7 @@ class PatreonExtractor(Extractor):
|
||||
self._attachments(post),
|
||||
self._content(post),
|
||||
):
|
||||
fhash = url.rsplit("/", 2)[1]
|
||||
fhash = url.split("/")[9].partition("?")[0]
|
||||
if fhash not in hashes:
|
||||
hashes.add(fhash)
|
||||
post["hash"] = fhash
|
||||
|
||||
Reference in New Issue
Block a user