diff --git a/docs/supportedsites.rst b/docs/supportedsites.rst index 42baadb4..9d4d6e66 100644 --- a/docs/supportedsites.rst +++ b/docs/supportedsites.rst @@ -7,6 +7,7 @@ Site URL Capabilities 4chan https://www.4chan.org/ Threads 4plebs https://archive.4plebs.org/ Threads 8chan https://8ch.net/ Threads +arch.b4k.co https://arch.b4k.co/ Threads Archive of Sins https://archiveofsins.com/ Threads Archived.Moe https://archived.moe/ Threads Batoto https://bato.to/ Chapters, Manga Optional @@ -73,6 +74,7 @@ Twitter https://twitter.com/ Tweets Warosu https://warosu.org/ Threads World Three http://www.slide.world-three.org/ Chapters, Manga Yandere https://yande.re/ Pools, Popular Images, Posts, Tag-Searches +YEET Archive https://archive.yeet.net/ Threads Acidimg https://acidimg.cc/ individual Images Chronos http://chronos.to/ individual Images Coreimg http://coreimg.net/ individual Images diff --git a/gallery_dl/extractor/__init__.py b/gallery_dl/extractor/__init__.py index 75573a05..5b6ef855 100644 --- a/gallery_dl/extractor/__init__.py +++ b/gallery_dl/extractor/__init__.py @@ -18,6 +18,7 @@ modules = [ "8chan", "archivedmoe", "archiveofsins", + "b4k", "batoto", "danbooru", "desuarchive", @@ -78,8 +79,10 @@ modules = [ "tumblr", "twitter", "warosu", + "whatisthisimnotgoodwithcomputers", "worldthree", "yandere", + "yeet", "imagehosts", "directlink", "recursive", diff --git a/gallery_dl/extractor/b4k.py b/gallery_dl/extractor/b4k.py new file mode 100644 index 00000000..a669f221 --- /dev/null +++ b/gallery_dl/extractor/b4k.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +# Copyright 2017 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 +# published by the Free Software Foundation. + +"""Extract images from https://arch.b4k.co/""" + +from . import chan + + +class BfourkThreadExtractor(chan.FoolfuukaThreadExtractor): + """Extractor for images from threads on arch.b4k.co""" + category = "b4k" + root = "https://arch.b4k.co" + pattern = [r"(?:https?://)?arch\.b4k\.co/([^/]+)/thread/(\d+)"] + test = [("http://arch.b4k.co/meta/thread/196/", { + "url": "cdd4931ac1cd00264b0b54e2e3b0d8f6ae48957e", + })] + + def remote(self, media): + return media["remote_media_link"] diff --git a/gallery_dl/extractor/chan.py b/gallery_dl/extractor/chan.py index ae38a9f3..18e326a1 100644 --- a/gallery_dl/extractor/chan.py +++ b/gallery_dl/extractor/chan.py @@ -70,12 +70,14 @@ class FoolfuukaThreadExtractor(SharedConfigExtractor): "{thread_num} - {title}"] filename_fmt = "{media[media]}" root = "" + referer = True def __init__(self, match): SharedConfigExtractor.__init__(self) self.board, self.thread = match.groups() self.session.headers["User-Agent"] = "Mozilla 5.0" - self.session.headers["Referer"] = self.root + if self.referer: + self.session.headers["Referer"] = self.root def items(self): op = True @@ -91,9 +93,9 @@ class FoolfuukaThreadExtractor(SharedConfigExtractor): url = media["media_link"] if not url and "remote_media_link" in media: - needle = '