mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[yourporn] Fix video_url (closes #21645)
This commit is contained in:
parent
0326bcb6c1
commit
f9549b30f8
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
parse_duration,
|
parse_duration,
|
||||||
urljoin,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -33,11 +32,13 @@ class YourPornIE(InfoExtractor):
|
|||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
video_url = urljoin(url, self._parse_json(
|
url_parts = self._parse_json(self._search_regex(
|
||||||
self._search_regex(
|
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info', group='data'), video_id)[video_id].split("/")
|
||||||
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info',
|
|
||||||
group='data'),
|
aid = self._search_regex(r'data-aid=\'([a-z0-9]+)\'', webpage, 'aid')
|
||||||
video_id)[video_id]).replace('/cdn/', '/cdn5/')
|
|
||||||
|
video_url = 'https://' + url_parts[2] + '.trafficdeposit.com/video/' + url_parts[3] + '/' + url_parts[
|
||||||
|
4] + '/' + url_parts[5] + '/' + aid + '/' + video_id + '.mp4'
|
||||||
|
|
||||||
title = (self._search_regex(
|
title = (self._search_regex(
|
||||||
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user