From 6abe5f5bbb225117e36ea001d786766fec5e8365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 12 Oct 2019 22:30:51 +0200 Subject: [PATCH] [patreon] fix pagination (#444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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/…" --- CHANGELOG.md | 2 ++ gallery_dl/extractor/patreon.py | 2 ++ gallery_dl/version.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a573946..b5f025c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/gallery_dl/extractor/patreon.py b/gallery_dl/extractor/patreon.py index ab5932de..9b13391f 100644 --- a/gallery_dl/extractor/patreon.py +++ b/gallery_dl/extractor/patreon.py @@ -76,6 +76,8 @@ class PatreonExtractor(Extractor): 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: diff --git a/gallery_dl/version.py b/gallery_dl/version.py index e83bed6a..c47109e5 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -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"