Skip to content

Commit

Permalink
[patreon] fix pagination (#444)
Browse files Browse the repository at this point in the history
The Patreon-provided URLs for the next set of posts aren't
always complete, i.e. they can be missing their scheme and
the subsequent double slash: "www.patreon.com/…"
  • Loading branch information
mikf committed Oct 12, 2019
1 parent ff1e4a8 commit 6abe5f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## Unreleased

## 1.10.6 - 2019-10-11
### Additions
- `--exec` command-line option to specify a command to run after each file download ([#421](https://github.com/mikf/gallery-dl/issues/421))
Expand Down
2 changes: 2 additions & 0 deletions gallery_dl/extractor/patreon.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def _pagination(self, url):
headers = {"Referer": self.root}

while url:
if not url.startswith("http"):
url = "https://" + url.lstrip("/:")
posts = self.request(url, headers=headers).json()

if "included" in posts:
Expand Down
2 changes: 1 addition & 1 deletion gallery_dl/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.6"
__version__ = "1.10.7-dev"

0 comments on commit 6abe5f5

Please sign in to comment.