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

@@ -12,19 +12,15 @@ from .common import Extractor, Message
from .. import text
import os.path
info = {
"category": "hentaifoundry",
"extractor": "HentaiFoundryExtractor",
"directory": ["{category}", "{artist}"],
"filename": "{category}_{index}_{title}.{extension}",
"pattern": [
r"(?:https?://)?(?:www\.)?hentai-foundry\.com/pictures/user/([^/]+)",
r"(?:https?://)?(?:www\.)?hentai-foundry\.com/user/([^/]+)/profile",
],
}
class HentaiFoundryExtractor(Extractor):
category = "hentaifoundry"
directory_fmt = ["{category}", "{artist}"]
filename_fmt = "{category}_{index}_{title}.{extension}"
pattern = [
r"(?:https?://)?(?:www\.)?hentai-foundry\.com/pictures/user/([^/]+)",
r"(?:https?://)?(?:www\.)?hentai-foundry\.com/user/([^/]+)/profile",
]
url_base = "http://www.hentai-foundry.com/pictures/user/"
def __init__(self, match):
@@ -60,7 +56,7 @@ class HentaiFoundryExtractor(Extractor):
token, pos = text.extract(page, 'hidden" value="', '"')
count, pos = text.extract(page, 'class="active" >Pictures (', ')', pos)
return {
"category": info["category"],
"category": self.category,
"artist": self.artist,
"count": count,
}, token