code cleanup to use nameext_from_url

This commit is contained in:
Mike Fährmann
2015-11-16 17:32:26 +01:00
parent ca523b9f64
commit c2f0720184
16 changed files with 26 additions and 74 deletions

View File

@@ -41,10 +41,8 @@ class SpectrumNexusExtractor(AsynchronousExtractor):
count = int(data["count"])
for i in range(1, count+1):
url = self.get_image_url(page)
name, ext = os.path.splitext(text.filename_from_url(url))
text.nameext_from_url(url, data)
data["page"] = i
data["name"] = name
data["extension"] = ext[1:]
yield Message.Url, url, data.copy()
if i < count:
params["page"] += 1