[pixhost] adjust to new site layout
This commit is contained in:
@@ -286,14 +286,14 @@ class PixhostImageExtractor(ImagehostImageExtractor):
|
|||||||
category = "pixhost"
|
category = "pixhost"
|
||||||
pattern = [(r"(?:https?://)?((?:www\.)?pixhost\.org/show/"
|
pattern = [(r"(?:https?://)?((?:www\.)?pixhost\.org/show/"
|
||||||
r"\d+/(\d+)_[^/]+)")]
|
r"\d+/(\d+)_[^/]+)")]
|
||||||
|
https = True
|
||||||
params = None
|
params = None
|
||||||
cookies = {"pixhostads": "1", "pixhosttest": "1"}
|
cookies = {"pixhostads": "1", "pixhosttest": "1"}
|
||||||
|
|
||||||
def get_info(self, page):
|
def get_info(self, page):
|
||||||
filename, pos = text.extract(page, '<div id="text">\n<h2>', '</h2>')
|
url , pos = text.extract(page, "src: '", "'")
|
||||||
url , pos = text.extract(page, '<img id="show_image" src="', '"', pos)
|
filename, pos = text.extract(page, "title: '", "'", pos)
|
||||||
pos = filename.find("_")
|
return url, filename
|
||||||
return url, filename[pos+1:] if pos != -1 else url
|
|
||||||
|
|
||||||
|
|
||||||
class TurboimagehostImageExtractor(ImagehostImageExtractor):
|
class TurboimagehostImageExtractor(ImagehostImageExtractor):
|
||||||
|
|||||||
Reference in New Issue
Block a user