summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/2chan.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-11-30 21:12:25 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2020-11-30 21:12:25 -0500
commit143723944033d7a6593d57bd1cf6ae97713b6ce7 (patch)
treef54d8e66ccccdcc07580726a284e215ba64a3b62 /gallery_dl/extractor/2chan.py
parent209a3c800871cd68edd2bc7ae661a24ecd496d2d (diff)
New upstream version 1.15.4.upstream/1.15.4
Diffstat (limited to 'gallery_dl/extractor/2chan.py')
-rw-r--r--gallery_dl/extractor/2chan.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/gallery_dl/extractor/2chan.py b/gallery_dl/extractor/2chan.py
index 51e461e..9813f2b 100644
--- a/gallery_dl/extractor/2chan.py
+++ b/gallery_dl/extractor/2chan.py
@@ -21,9 +21,9 @@ class _2chanThreadExtractor(Extractor):
archive_fmt = "{board}_{thread}_{tim}"
url_fmt = "https://{server}.2chan.net/{board}/src/{filename}"
pattern = r"(?:https?://)?([^.]+)\.2chan\.net/([^/]+)/res/(\d+)"
- test = ("http://dec.2chan.net/70/res/11048.htm", {
- "url": "2ecf919139bd5d915930530b3576d67c388a2a49",
- "keyword": "8def4ec98a89fd4fff8bbcbae603604dcb4a3bb9",
+ test = ("http://dec.2chan.net/70/res/4752.htm", {
+ "url": "1c2d2ce8aea0fc71d94735cfc30009d628f33548",
+ "keyword": "f508d6841ea2cb19ed799aac9dc580263ca50651",
})
def __init__(self, match):
@@ -70,7 +70,8 @@ class _2chanThreadExtractor(Extractor):
data = self._extract_post(post)
if data["name"]:
data["name"] = data["name"].strip()
- if '<a href="/' in post:
+ path = text.extract(post, '<a href="/', '"')[0]
+ if path and not path.startswith("bin/jump"):
self._extract_image(post, data)
data["tim"], _, data["extension"] = data["filename"].partition(".")
data["time"] = data["tim"][:-3]