diff options
| author | 2022-07-16 00:39:25 -0400 | |
|---|---|---|
| committer | 2022-07-16 00:39:25 -0400 | |
| commit | ae2a0f5622beaa6f402526f8a7b939419283a090 (patch) | |
| tree | df1ee84f90167211ae4817606fe6e7380abb67b1 /gallery_dl/extractor/2chan.py | |
| parent | ce35450b5308adab049c5bd99095986d4c607027 (diff) | |
New upstream version 1.22.4.upstream/1.22.4
Diffstat (limited to 'gallery_dl/extractor/2chan.py')
| -rw-r--r-- | gallery_dl/extractor/2chan.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gallery_dl/extractor/2chan.py b/gallery_dl/extractor/2chan.py index 38b2d5a..f5125ee 100644 --- a/gallery_dl/extractor/2chan.py +++ b/gallery_dl/extractor/2chan.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017-2021 Mike Fährmann +# Copyright 2017-2022 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -13,7 +13,7 @@ from .. import text class _2chanThreadExtractor(Extractor): - """Extractor for images from threads on www.2chan.net""" + """Extractor for 2chan threads""" category = "2chan" subcategory = "thread" directory_fmt = ("{category}", "{board_name}", "{thread}") @@ -21,9 +21,24 @@ class _2chanThreadExtractor(Extractor): archive_fmt = "{board}_{thread}_{tim}" url_fmt = "https://{server}.2chan.net/{board}/src/{filename}" pattern = r"(?:https?://)?([\w-]+)\.2chan\.net/([^/]+)/res/(\d+)" - test = ("http://dec.2chan.net/70/res/4752.htm", { - "url": "f49aa31340e9a3429226af24e19e01f5b819ca1f", - "keyword": "44599c21b248e79692b2eb2da12699bd0ed5640a", + test = ("https://dec.2chan.net/70/res/14565.htm", { + "pattern": r"https://dec\.2chan\.net/70/src/\d{13}\.jpg", + "count": ">= 3", + "keyword": { + "board": "70", + "board_name": "新板提案", + "com": str, + "fsize": r"re:\d+", + "name": "名無し", + "no": r"re:1[45]\d\d\d", + "now": r"re:22/../..\(.\)..:..:..", + "post": "無題", + "server": "dec", + "thread": "14565", + "tim": r"re:^\d{13}$", + "time": r"re:^\d{10}$", + "title": "ヒロアカ板" + }, }) def __init__(self, match): |
