rewrite extractors to use text-module

This commit is contained in:
Mike Fährmann
2015-10-03 15:43:02 +02:00
parent 2962bf36f6
commit 42b8e81a68
11 changed files with 66 additions and 98 deletions

View File

@@ -8,9 +8,8 @@
"""Extract images from albums at http://imgchili.net/"""
from .common import SequentialExtractor
from .common import Message
from .common import filename_from_url
from .common import SequentialExtractor, Message
from .. import text
import re
info = {
@@ -42,7 +41,7 @@ class ImgchiliExtractor(SequentialExtractor):
def get_job_metadata(self, page):
"""Collect metadata for extractor-job"""
title = self.extract(page, "<h1>", "</h1>")[0]
title = text.extract(page, "<h1>", "</h1>")[0]
return {
"category": info["category"],
"title": title,