diff --git a/docs/gallery-dl.conf b/docs/gallery-dl.conf index 05092747..c43edcc6 100644 --- a/docs/gallery-dl.conf +++ b/docs/gallery-dl.conf @@ -51,6 +51,8 @@ }, "sankaku": { + "wait-min": 2, + "wait-max": 4, "username": null, "password": null }, diff --git a/gallery_dl/extractor/deviantart.py b/gallery_dl/extractor/deviantart.py index dfc80d00..81ac1520 100644 --- a/gallery_dl/extractor/deviantart.py +++ b/gallery_dl/extractor/deviantart.py @@ -300,7 +300,7 @@ class DeviantartCollectionExtractor(DeviantartExtractor): r"/favourites/(\d+)/([^/?&#]+)"] test = [("http://rosuuri.deviantart.com/favourites/58951174/Useful", { "url": "f43b202011483e06998db1891e4b62381fabd64a", - "keyword": "629eb627747b3f0ae35541d0725cc345b3ac5aca", + "keyword": "1cd7172d3542a365620b8f103e47e4ef864e5156", "options": (("original", False),), })] diff --git a/gallery_dl/extractor/sankaku.py b/gallery_dl/extractor/sankaku.py index 32cf69e9..ff67b595 100644 --- a/gallery_dl/extractor/sankaku.py +++ b/gallery_dl/extractor/sankaku.py @@ -21,7 +21,8 @@ class SankakuTagExtractor(Extractor): subcategory = "tag" directory_fmt = ["{category}", "{tags}"] filename_fmt = "{category}_{id}_{md5}.{extension}" - pattern = [r"(?:https?://)?chan\.sankakucomplex\.com/\?tags=([^&]+)"] + pattern = [r"(?:https?://)?chan\.sankakucomplex\.com" + r"/\?(?:[^&#]*&)*tags=([^&#]+)"] test = [("https://chan.sankakucomplex.com/?tags=bonocho", { "count": 5, "pattern": (r"https://cs\.sankakucomplex\.com/data/[^/]{2}/[^/]{2}" @@ -63,6 +64,7 @@ class SankakuTagExtractor(Extractor): return {"tags": self.tags} def get_images(self): + """Yield all available images for the given tags""" params = { "tags": self.tags, "page": self.pagestart, @@ -80,8 +82,13 @@ class SankakuTagExtractor(Extractor): return params["page"] += 1 params["next"] = image["id"] - 1 + self.log.warning( + "Unauthenticated users may only access the first 500 images / 25 " + "pages. (Use '--range 501-' to continue downloading from this " + "point onwards after setting up an account.)") def get_image_metadata(self, image_id): + """Collect metadata for a single image""" url = "https://chan.sankakucomplex.com/post/show/" + image_id page = self.request(url, retries=10).text image_url, pos = text.extract(page, '
  • Original: