[4plebs] add thread extractor (#18)

This commit is contained in:
Mike Fährmann
2017-07-03 16:43:04 +02:00
parent dcc1d3b2ea
commit 474e9c1aec
3 changed files with 59 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
# -*- 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://archive.4plebs.org/"""
from . import chan
class FourplebsThreadExtractor(chan.FoolfuukaThreadExtractor):
"""Extractor for images from threads on 4plebs.org"""
category = "4plebs"
pattern = [r"(?:https?://)?(?:archive\.)?4plebs\.org/([^/]+)/thread/(\d+)"]
test = [("https://archive.4plebs.org/tg/thread/54111182/", {
"url": "85f54faf037dee29ad1c413142bcc45cd905be5a",
"keyword": "59c414bddc58b77b3e481fbe1c4e4ea3d582b2d3",
})]
root = "https://archive.4plebs.org"