[hellporno] Changes for PR #11247

This commit is contained in:
Andy Savicki 2016-11-21 22:15:42 +03:00
parent ceb030a1eb
commit f44e293bcc

View File

@ -6,11 +6,12 @@ from .common import InfoExtractor
from ..utils import (
js_to_json,
remove_end,
determine_ext,
)
class HellPornoIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?hellporno\.((com/videos)|(net/v))/(?P<id>[^/]+)'
_VALID_URL = r'https?://(?:www\.)?hellporno\.(?:(?:com/videos)|(?:net/v))/(?P<id>[^/]+)'
_TESTS = [{
'url': 'http://hellporno.com/videos/dixie-is-posing-with-naked-ass-very-erotic/',
'md5': '1fee339c610d2049699ef2aa699439f1',
@ -23,7 +24,7 @@ class HellPornoIE(InfoExtractor):
'age_limit': 18,
}
}, {
'url' : 'http://hellporno.net/v/186486/',
'url': 'http://hellporno.net/v/186486/',
'md5': '65adb331709d68d01067527d5547ae88',
'info_dict': {
'id': '186486',
@ -32,7 +33,10 @@ class HellPornoIE(InfoExtractor):
'title': 'Tattooed brunette tries anal sex with a big cock',
'thumbnail': 're:https?://.*\.jpg/$',
'age_limit': 18,
}
}
}, {
'url': 'http://hellporno.net/v/186271/',
'only_matching': True,
}]
def _real_extract(self, url):
@ -49,9 +53,7 @@ class HellPornoIE(InfoExtractor):
video_id = flashvars.get('video_id')
thumbnail = flashvars.get('preview_url')
ext = flashvars.get('postfix')
if ext is not None:
ext = ext[ext.rfind(".")+1:]
ext = determine_ext(flashvars.get('postfix'), 'mp4')
formats = []
for video_url_key in ['video_url', 'video_alt_url']: