1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 12:42:29 +01:00

[pixhost] adjust to new site layout

This commit is contained in:
Mike Fährmann 2016-12-06 10:03:33 +01:00
parent 0989cd2430
commit d1cd9acf54
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -286,14 +286,14 @@ class PixhostImageExtractor(ImagehostImageExtractor):
category = "pixhost"
pattern = [(r"(?:https?://)?((?:www\.)?pixhost\.org/show/"
r"\d+/(\d+)_[^/]+)")]
https = True
params = None
cookies = {"pixhostads": "1", "pixhosttest": "1"}
def get_info(self, page):
filename, pos = text.extract(page, '<div id="text">\n<h2>', '</h2>')
url , pos = text.extract(page, '<img id="show_image" src="', '"', pos)
pos = filename.find("_")
return url, filename[pos+1:] if pos != -1 else url
url , pos = text.extract(page, "src: '", "'")
filename, pos = text.extract(page, "title: '", "'", pos)
return url, filename
class TurboimagehostImageExtractor(ImagehostImageExtractor):