summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/foolfuuka.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/foolfuuka.py')
-rw-r--r--gallery_dl/extractor/foolfuuka.py75
1 files changed, 4 insertions, 71 deletions
diff --git a/gallery_dl/extractor/foolfuuka.py b/gallery_dl/extractor/foolfuuka.py
index 76fb69e..93ac541 100644
--- a/gallery_dl/extractor/foolfuuka.py
+++ b/gallery_dl/extractor/foolfuuka.py
@@ -22,7 +22,6 @@ class FoolfuukaExtractor(BaseExtractor):
def __init__(self, match):
BaseExtractor.__init__(self, match)
- self.session.headers["Referer"] = self.root
if self.category == "b4k":
self.remote = self._remote_direct
@@ -109,43 +108,7 @@ class FoolfuukaThreadExtractor(FoolfuukaExtractor):
directory_fmt = ("{category}", "{board[shortname]}",
"{thread_num} {title|comment[:50]}")
pattern = BASE_PATTERN + r"/([^/?#]+)/thread/(\d+)"
- test = (
- ("https://archive.4plebs.org/tg/thread/54059290", {
- "url": "fd823f17b5001442b941fddcd9ec91bafedfbc79",
- }),
- ("https://archived.moe/gd/thread/309639/", {
- "url": "fdd533840e2d535abd162c02d6dfadbc12e2dcd8",
- "content": "c27e2a7be3bc989b5dd859f7789cc854db3f5573",
- }),
- ("https://archived.moe/a/thread/159767162/", {
- "url": "ffec05a1a1b906b5ca85992513671c9155ee9e87",
- }),
- ("https://archiveofsins.com/h/thread/4668813/", {
- "url": "f612d287087e10a228ef69517cf811539db9a102",
- "content": "0dd92d0d8a7bf6e2f7d1f5ac8954c1bcf18c22a4",
- }),
- ("https://arch.b4k.co/meta/thread/196/", {
- "url": "d309713d2f838797096b3e9cb44fe514a9c9d07a",
- }),
- ("https://desuarchive.org/a/thread/159542679/", {
- "url": "e7d624aded15a069194e38dc731ec23217a422fb",
- }),
- ("https://boards.fireden.net/sci/thread/11264294/", {
- "url": "61cab625c95584a12a30049d054931d64f8d20aa",
- }),
- ("https://archive.palanq.win/c/thread/4209598/", {
- "url": "1f9b5570d228f1f2991c827a6631030bc0e5933c",
- }),
- ("https://rbt.asia/g/thread/61487650/", {
- "url": "fadd274b25150a1bdf03a40c58db320fa3b617c4",
- }),
- ("https://archive.rebeccablacktech.com/g/thread/61487650/", {
- "url": "fadd274b25150a1bdf03a40c58db320fa3b617c4",
- }),
- ("https://thebarchive.com/b/thread/739772332/", {
- "url": "e8b18001307d130d67db31740ce57c8561b5d80c",
- }),
- )
+ example = "https://archived.moe/a/thread/12345/"
def __init__(self, match):
FoolfuukaExtractor.__init__(self, match)
@@ -173,17 +136,7 @@ class FoolfuukaBoardExtractor(FoolfuukaExtractor):
"""Base extractor for FoolFuuka based boards/archives"""
subcategory = "board"
pattern = BASE_PATTERN + r"/([^/?#]+)/\d*$"
- test = (
- ("https://archive.4plebs.org/tg/"),
- ("https://archived.moe/gd/"),
- ("https://archiveofsins.com/h/"),
- ("https://arch.b4k.co/meta/"),
- ("https://desuarchive.org/a/"),
- ("https://boards.fireden.net/sci/"),
- ("https://archive.palanq.win/c/"),
- ("https://rbt.asia/g/"),
- ("https://thebarchive.com/b/"),
- )
+ example = "https://archived.moe/a/"
def __init__(self, match):
FoolfuukaExtractor.__init__(self, match)
@@ -215,18 +168,8 @@ class FoolfuukaSearchExtractor(FoolfuukaExtractor):
subcategory = "search"
directory_fmt = ("{category}", "search", "{search}")
pattern = BASE_PATTERN + r"/([^/?#]+)/search((?:/[^/?#]+/[^/?#]+)+)"
+ example = "https://archived.moe/_/search/text/QUERY/"
request_interval = 1.0
- test = (
- ("https://archive.4plebs.org/_/search/text/test/"),
- ("https://archived.moe/_/search/text/test/"),
- ("https://archiveofsins.com/_/search/text/test/"),
- ("https://archiveofsins.com/_/search/text/test/"),
- ("https://desuarchive.org/_/search/text/test/"),
- ("https://boards.fireden.net/_/search/text/test/"),
- ("https://archive.palanq.win/_/search/text/test/"),
- ("https://rbt.asia/_/search/text/test/"),
- ("https://thebarchive.com/_/search/text/test/"),
- )
def __init__(self, match):
FoolfuukaExtractor.__init__(self, match)
@@ -281,17 +224,7 @@ class FoolfuukaGalleryExtractor(FoolfuukaExtractor):
subcategory = "gallery"
directory_fmt = ("{category}", "{board}", "gallery")
pattern = BASE_PATTERN + r"/([^/?#]+)/gallery(?:/(\d+))?"
- test = (
- ("https://archive.4plebs.org/tg/gallery/1"),
- ("https://archived.moe/gd/gallery/2"),
- ("https://archiveofsins.com/h/gallery/3"),
- ("https://arch.b4k.co/meta/gallery/"),
- ("https://desuarchive.org/a/gallery/5"),
- ("https://boards.fireden.net/sci/gallery/6"),
- ("https://archive.palanq.win/c/gallery"),
- ("https://rbt.asia/g/gallery/8"),
- ("https://thebarchive.com/b/gallery/9"),
- )
+ example = "https://archived.moe/a/gallery"
def __init__(self, match):
FoolfuukaExtractor.__init__(self, match)