[4chan] support 4channel.org domain
This commit is contained in:
@@ -15,12 +15,19 @@ from .. import text
|
|||||||
class FourchanThreadExtractor(chan.ChanThreadExtractor):
|
class FourchanThreadExtractor(chan.ChanThreadExtractor):
|
||||||
"""Extractor for images from threads from 4chan.org"""
|
"""Extractor for images from threads from 4chan.org"""
|
||||||
category = "4chan"
|
category = "4chan"
|
||||||
pattern = [r"(?:https?://)?boards\.4chan\.org/([^/]+)/thread/(\d+)"]
|
pattern = [r"(?:https?://)?boards\.4chan(?:nel)?\.org"
|
||||||
test = [("https://boards.4chan.org/tg/thread/15396072/", {
|
r"/([^/]+)/thread/(\d+)"]
|
||||||
"url": "39082ad166161966d7ba8e37f2173a824eb540f0",
|
test = [
|
||||||
"keyword": "7ae2f4049adf0d2f835eb91b6b26b7f4ec882e0a",
|
("https://boards.4chan.org/tg/thread/15396072/", {
|
||||||
"content": "20b7b51afa51c9c31a0020a0737b889532c8d7ec",
|
"url": "39082ad166161966d7ba8e37f2173a824eb540f0",
|
||||||
})]
|
"keyword": "7ae2f4049adf0d2f835eb91b6b26b7f4ec882e0a",
|
||||||
|
"content": "20b7b51afa51c9c31a0020a0737b889532c8d7ec",
|
||||||
|
}),
|
||||||
|
("https://boards.4channel.org/tg/thread/15396072/", {
|
||||||
|
"url": "39082ad166161966d7ba8e37f2173a824eb540f0",
|
||||||
|
"keyword": "7ae2f4049adf0d2f835eb91b6b26b7f4ec882e0a",
|
||||||
|
}),
|
||||||
|
]
|
||||||
api_url = "https://a.4cdn.org/{board}/thread/{thread}.json"
|
api_url = "https://a.4cdn.org/{board}/thread/{thread}.json"
|
||||||
file_url = "https://i.4cdn.org/{board}/{tim}{ext}"
|
file_url = "https://i.4cdn.org/{board}/{tim}{ext}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user