1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[postimg] add extractor

This commit is contained in:
Mike Fährmann 2016-12-06 12:46:41 +01:00
parent d1cd9acf54
commit 583f1b8bbb
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -296,6 +296,19 @@ class PixhostImageExtractor(ImagehostImageExtractor):
return url, filename
class PostimgImageExtractor(ImagehostImageExtractor):
"""Extractor for single images from postimg.org"""
category = "postimg"
pattern = [(r"(?:https?://)?((?:www\.)?(?:postimg|pixxxels)\.org/"
r"image/([^/]+)/?)")]
https = True
params = None
def get_info(self, page):
url = "https:" + text.extract(page, 'data-full="', '"')[0]
return url, url
class TurboimagehostImageExtractor(ImagehostImageExtractor):
"""Extractor for single images from turboimagehost.com"""
category = "turboimagehost"