update all other extractors

This commit is contained in:
Mike Fährmann
2015-11-21 04:26:30 +01:00
parent 2dfe97dd00
commit 4d56b76aa8
21 changed files with 131 additions and 256 deletions

View File

@@ -10,20 +10,14 @@
from .common import Extractor, Message
from .. import text
import os.path
info = {
"category": "imgth",
"extractor": "ImgthExtractor",
"directory": ["{category}", "{gallery-id} {title}"],
"filename": "{category}_{gallery-id}_{num:>03}.{extension}",
"pattern": [
r"(?:https?://)?imgth\.com/gallery/(\d+)",
],
}
class ImgthExtractor(Extractor):
category = "imgth"
directory_fmt = ["{category}", "{gallery-id} {title}"]
filename_fmt = "{category}_{gallery-id}_{num:>03}.{extension}"
pattern = [r"(?:https?://)?imgth\.com/gallery/(\d+)"]
def __init__(self, match):
Extractor.__init__(self)
self.gid = match.group(1)
@@ -55,7 +49,7 @@ class ImgthExtractor(Extractor):
def get_job_metadata(self, page):
"""Collect metadata for extractor-job"""
data = {
"category": info["category"],
"category": self.category,
"gallery-id": self.gid,
}
data, _ = text.extract_all(page, (