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,21 +10,17 @@
from .common import AsynchronousExtractor, Message
from .. import text
import os.path
info = {
"category": "spectrumnexus",
"extractor": "SpectrumNexusExtractor",
"directory": ["{category}", "{manga}", "c{chapter:>03}"],
"filename": "{manga}_c{chapter:>03}_{page:>03}.{extension}",
"pattern": [
r"(?:https?://)?(view\.thespectrum\.net/series/[^\.]+.html)\?ch=Chapter\+(\d+)",
r"(?:https?://)?(view\.thespectrum\.net/series/[^/]+-chapter-(\d+)\.html)",
],
}
class SpectrumNexusExtractor(AsynchronousExtractor):
category = "spectrumnexus"
directory_fmt = ["{category}", "{manga}", "c{chapter:>03}"]
filename_fmt = "{manga}_c{chapter:>03}_{page:>03}.{extension}"
pattern = [
r"(?:https?://)?(view\.thespectrum\.net/series/[^\.]+.html)\?ch=Chapter\+(\d+)",
r"(?:https?://)?(view\.thespectrum\.net/series/[^/]+-chapter-(\d+)\.html)",
]
def __init__(self, match):
AsynchronousExtractor.__init__(self)
self.url = "http://" + match.group(1)
@@ -52,7 +48,7 @@ class SpectrumNexusExtractor(AsynchronousExtractor):
def get_job_metadata(self, page):
"""Collect metadata for extractor-job"""
data = {
"category": info["category"],
"category": self.category,
"chapter": self.chapter,
}
return text.extract_all(page, (