diff options
| author | 2026-01-06 04:24:52 -0500 | |
|---|---|---|
| committer | 2026-01-06 04:24:52 -0500 | |
| commit | 385e4bfb1e426d23417ac788a6f44d639e226c89 (patch) | |
| tree | e64f04e19d63014d48e3b5272ce112c637236ba7 /gallery_dl/extractor/arcalive.py | |
| parent | a24ec1647aeac35a63b744ea856011ad6e06be3b (diff) | |
New upstream version 1.31.2.upstream/1.31.2upstream
Diffstat (limited to 'gallery_dl/extractor/arcalive.py')
| -rw-r--r-- | gallery_dl/extractor/arcalive.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gallery_dl/extractor/arcalive.py b/gallery_dl/extractor/arcalive.py index f950d14..d48e4f5 100644 --- a/gallery_dl/extractor/arcalive.py +++ b/gallery_dl/extractor/arcalive.py @@ -36,7 +36,7 @@ class ArcalivePostExtractor(ArcaliveExtractor): directory_fmt = ("{category}", "{boardSlug}") filename_fmt = "{id}_{num}{title:? //[b:230]}.{extension}" archive_fmt = "{id}_{num}" - pattern = rf"{BASE_PATTERN}/b/(?:\w+)/(\d+)" + pattern = BASE_PATTERN + r"/b/(?:\w+)/(\d+)" example = "https://arca.live/b/breaking/123456789" def items(self): @@ -84,7 +84,7 @@ class ArcalivePostExtractor(ArcaliveExtractor): url = src fallback = () - query = f"?type=orig&{query}" + query = "?type=orig&" + query if orig := text.extr(media, 'data-orig="', '"'): path, _, ext = url.rpartition(".") if ext != orig: @@ -115,7 +115,7 @@ class ArcalivePostExtractor(ArcaliveExtractor): class ArcaliveBoardExtractor(ArcaliveExtractor): """Extractor for an arca.live board's posts""" subcategory = "board" - pattern = rf"{BASE_PATTERN}/b/([^/?#]+)/?(?:\?([^#]+))?$" + pattern = BASE_PATTERN + r"/b/([^/?#]+)/?(?:\?([^#]+))?$" example = "https://arca.live/b/breaking" def articles(self): @@ -127,7 +127,7 @@ class ArcaliveBoardExtractor(ArcaliveExtractor): class ArcaliveUserExtractor(ArcaliveExtractor): """Extractor for an arca.live users's posts""" subcategory = "user" - pattern = rf"{BASE_PATTERN}/u/@([^/?#]+)/?(?:\?([^#]+))?$" + pattern = BASE_PATTERN + r"/u/@([^/?#]+)/?(?:\?([^#]+))?$" example = "https://arca.live/u/@USER" def articles(self): @@ -169,8 +169,11 @@ class ArcaliveAPI(): return data self.log.debug("Server response: %s", data) - msg = f": {msg}" if (msg := data.get("message")) else "" - raise exception.AbortExtraction(f"API request failed{msg}") + if msg := data.get("message"): + msg = "API request failed: " + msg + else: + msg = "API request failed" + raise exception.AbortExtraction(msg) def _pagination(self, endpoint, params, key): while True: |
