[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:
parent
a31c1aae72
commit
08674a91f3
@ -1,5 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
## 1.13.4 - 2020-04-12
|
||||
### Additions
|
||||
- [aryion] add `gallery` and `post` extractors ([#390](https://github.com/mikf/gallery-dl/issues/390), [#673](https://github.com/mikf/gallery-dl/issues/673))
|
||||
|
@ -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
|
||||
|
@ -6,4 +6,4 @@
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
# published by the Free Software Foundation.
|
||||
|
||||
__version__ = "1.13.4"
|
||||
__version__ = "1.13.5-dev"
|
||||
|
Loading…
x
Reference in New Issue
Block a user