[*chan] code cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2015 Mike Fährmann
|
||||
# Copyright 2015, 2016 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
|
||||
@@ -8,12 +8,11 @@
|
||||
|
||||
"""Extract images and videos from https://www.4chan.org/"""
|
||||
|
||||
from .chan import ChanExtractor
|
||||
from . import chan
|
||||
|
||||
class FourchanThreadExtractor(ChanExtractor):
|
||||
class FourchanThreadExtractor(chan.ChanThreadExtractor):
|
||||
"""Extractor for images from threads from 4chan.org"""
|
||||
category = "4chan"
|
||||
subcategory = "thread"
|
||||
pattern = [r"(?:https?://)?boards\.4chan\.org/([^/]+)/thread/(\d+)"]
|
||||
test = [("https://boards.4chan.org/tg/thread/15396072/", {
|
||||
"url": "39082ad166161966d7ba8e37f2173a824eb540f0",
|
||||
@@ -22,8 +21,3 @@ class FourchanThreadExtractor(ChanExtractor):
|
||||
})]
|
||||
api_url = "https://a.4cdn.org/{board}/thread/{thread}.json"
|
||||
file_url = "https://i.4cdn.org/{board}/{tim}{ext}"
|
||||
|
||||
def __init__(self, match):
|
||||
ChanExtractor.__init__(
|
||||
self, match.group(1), match.group(2)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user