diff options
| author | 2026-01-06 04:25:00 -0500 | |
|---|---|---|
| committer | 2026-01-06 04:25:00 -0500 | |
| commit | 77589574c157fbf651dd251079cd02f6e282e623 (patch) | |
| tree | 3765f27e6b5fe6c5050fa952347c686021718606 /gallery_dl/extractor/schalenetwork.py | |
| parent | d4b96bc46d493f54e12c06d98115fccaab1b7ed2 (diff) | |
| parent | 385e4bfb1e426d23417ac788a6f44d639e226c89 (diff) | |
Update upstream source from tag 'upstream/1.31.2'
Update to upstream version '1.31.2'
with Debian dir 4ebe0ca706fc53eceb778881b680572ca5a0231c
Diffstat (limited to 'gallery_dl/extractor/schalenetwork.py')
| -rw-r--r-- | gallery_dl/extractor/schalenetwork.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gallery_dl/extractor/schalenetwork.py b/gallery_dl/extractor/schalenetwork.py index bbbb9da..30e57bc 100644 --- a/gallery_dl/extractor/schalenetwork.py +++ b/gallery_dl/extractor/schalenetwork.py @@ -64,7 +64,7 @@ class SchalenetworkExtractor(Extractor): def _token(self, required=True): if token := self.config("token"): - return f"Bearer {token.rpartition(' ')[2]}" + return "Bearer " + token.rpartition(' ')[2] if required: raise exception.AuthRequired("'token'", "your favorites") @@ -98,7 +98,7 @@ class SchalenetworkGalleryExtractor(SchalenetworkExtractor, GalleryExtractor): directory_fmt = ("{category}", "{id} {title}") archive_fmt = "{id}_{num}" request_interval = 0.0 - pattern = rf"{BASE_PATTERN}/(?:g|reader)/(\d+)/(\w+)" + pattern = BASE_PATTERN + r"/(?:g|reader)/(\d+)/(\w+)" example = "https://niyaniya.moe/g/12345/67890abcde/" TAG_TYPES = { @@ -172,7 +172,7 @@ class SchalenetworkGalleryExtractor(SchalenetworkExtractor, GalleryExtractor): if self.config("cbz", False): headers["Authorization"] = self._token() dl = self.request_json( - f"{url}&action=dl", method="POST", headers=headers) + url + "&action=dl", method="POST", headers=headers) # 'crt' parameter here is necessary for 'hdoujin' downloads url = f"{dl['base']}?crt={self._crt()}" info = text.nameext_from_url(url) @@ -227,7 +227,7 @@ class SchalenetworkGalleryExtractor(SchalenetworkExtractor, GalleryExtractor): class SchalenetworkSearchExtractor(SchalenetworkExtractor): """Extractor for schale.network search results""" subcategory = "search" - pattern = rf"{BASE_PATTERN}/(?:tag/([^/?#]+)|browse)?(?:/?\?([^#]*))?$" + pattern = BASE_PATTERN + r"/(?:tag/([^/?#]+)|browse)?(?:/?\?([^#]*))?$" example = "https://niyaniya.moe/browse?s=QUERY" def items(self): @@ -252,14 +252,14 @@ class SchalenetworkSearchExtractor(SchalenetworkExtractor): class SchalenetworkFavoriteExtractor(SchalenetworkExtractor): """Extractor for schale.network favorites""" subcategory = "favorite" - pattern = rf"{BASE_PATTERN}/favorites(?:\?([^#]*))?" + pattern = BASE_PATTERN + r"/favorites(?:\?([^#]*))?" example = "https://niyaniya.moe/favorites" def items(self): params = text.parse_query(self.groups[1]) params["page"] = text.parse_int(params.get("page"), 1) self.headers["Authorization"] = self._token() - return self._pagination(f"/books/favorites?crt={self._crt()}", params) + return self._pagination("/books/favorites?crt=" + self._crt(), params) SchalenetworkExtractor.extr_class = SchalenetworkGalleryExtractor |
