|
|
@ -46,16 +46,17 @@ class PornHdIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
|
|
quality = qualities(['sd', 'hd'])
|
|
|
|
quality = qualities(['sd', 'hd'])
|
|
|
|
sources = json.loads(js_to_json(self._search_regex(
|
|
|
|
sources = json.loads(js_to_json(self._search_regex(
|
|
|
|
r"(?s)'sources'\s*:\s*(\{.+?\})\s*\}\);", webpage, 'sources')))
|
|
|
|
r"(?s)'sources'\s*:\s*(\{.+?\})\s*\}[;,)]",
|
|
|
|
|
|
|
|
webpage, 'sources')))
|
|
|
|
formats = []
|
|
|
|
formats = []
|
|
|
|
for container, s in sources.items():
|
|
|
|
for qname, video_url in sources.items():
|
|
|
|
for qname, video_url in s.items():
|
|
|
|
if not video_url:
|
|
|
|
formats.append({
|
|
|
|
continue
|
|
|
|
'url': video_url,
|
|
|
|
formats.append({
|
|
|
|
'container': container,
|
|
|
|
'url': video_url,
|
|
|
|
'format_id': '%s-%s' % (container, qname),
|
|
|
|
'format_id': qname,
|
|
|
|
'quality': quality(qname),
|
|
|
|
'quality': quality(qname),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
self._sort_formats(formats)
|
|
|
|
self._sort_formats(formats)
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|