From 527bb2c4abee2f97e0d4386ab119ff13935e27a6 Mon Sep 17 00:00:00 2001 From: enduser420 <91022934+enduser420@users.noreply.github.com> Date: Mon, 26 Dec 2022 20:46:36 +0530 Subject: [PATCH] [lynxchan/bbw-chan] add 'thread' and 'board' extractors --- docs/supportedsites.md | 6 ++++++ gallery_dl/extractor/lynxchan.py | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/supportedsites.md b/docs/supportedsites.md index e6a1c845..74085063 100644 --- a/docs/supportedsites.md +++ b/docs/supportedsites.md @@ -1055,6 +1055,12 @@ Consider all sites to be NSFW unless otherwise known. LynxChan Imageboards + + Bbw-chan + https://bbw-chan.nl/ + Boards, Threads + + Kohlchan https://kohlchan.net/ diff --git a/gallery_dl/extractor/lynxchan.py b/gallery_dl/extractor/lynxchan.py index bbcf9c0f..85e8bb1e 100644 --- a/gallery_dl/extractor/lynxchan.py +++ b/gallery_dl/extractor/lynxchan.py @@ -17,9 +17,13 @@ class LynxchanExtractor(BaseExtractor): BASE_PATTERN = LynxchanExtractor.update({ + "bbw-chan": { + "root": "https://bbw-chan.nl", + "pattern": r"bbw-chan\.nl", + }, "kohlchan": { "root": "https://kohlchan.net", - "pattern": r"kohlchan\.net" + "pattern": r"kohlchan\.net", }, "endchan": { "root": None, @@ -37,6 +41,11 @@ class LynxchanThreadExtractor(LynxchanExtractor): archive_fmt = "{boardUri}_{postId}_{num}" pattern = BASE_PATTERN + r"/([^/?#]+)/res/(\d+)" test = ( + ("https://bbw-chan.nl/bbwdraw/res/499.html", { + "pattern": r"https://bbw-chan\.nl/\.media/[0-9a-f]{64}(\.\w+)?$", + "count": ">= 352", + }), + ("https://bbw-chan.nl/bbwdraw/res/489.html"), ("https://kohlchan.net/a/res/4594.html", { "pattern": r"https://kohlchan\.net/\.media/[0-9a-f]{64}(\.\w+)?$", "count": ">= 80", @@ -78,6 +87,11 @@ class LynxchanBoardExtractor(LynxchanExtractor): subcategory = "board" pattern = BASE_PATTERN + r"/([^/?#]+)(?:/index|/catalog|/\d+|/?$)" test = ( + ("https://bbw-chan.nl/bbwdraw/", { + "pattern": LynxchanThreadExtractor.pattern, + "count": ">= 148", + }), + ("https://bbw-chan.nl/bbwdraw/2.html"), ("https://kohlchan.net/a/", { "pattern": LynxchanThreadExtractor.pattern, "count": ">= 100",