mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 01:25:11 +00:00
[pornhd] Fix
This commit is contained in:
parent
4a192f817e
commit
e299f6d27f
1 changed files with 15 additions and 9 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
@ -7,12 +9,12 @@
|
||||||
class PornHdIE(InfoExtractor):
|
class PornHdIE(InfoExtractor):
|
||||||
_VALID_URL = r'(?:http://)?(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?P<video_id>[0-9]+)/(?P<video_title>.+)'
|
_VALID_URL = r'(?:http://)?(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?P<video_id>[0-9]+)/(?P<video_title>.+)'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
u'url': u'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video',
|
'url': 'http://www.pornhd.com/videos/1962/sierra-day-gets-his-cum-all-over-herself-hd-porn-video',
|
||||||
u'file': u'1962.flv',
|
'file': '1962.flv',
|
||||||
u'md5': u'35272469887dca97abd30abecc6cdf75',
|
'md5': '35272469887dca97abd30abecc6cdf75',
|
||||||
u'info_dict': {
|
'info_dict': {
|
||||||
u"title": u"sierra-day-gets-his-cum-all-over-herself-hd-porn-video",
|
"title": "sierra-day-gets-his-cum-all-over-herself-hd-porn-video",
|
||||||
u"age_limit": 18,
|
"age_limit": 18,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,9 +26,13 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
video_url = self._html_search_regex(
|
next_url = self._html_search_regex(
|
||||||
r'&hd=(http.+?)&', webpage, u'video URL')
|
r'&hd=(http.+?)&', webpage, 'video URL')
|
||||||
video_url = compat_urllib_parse.unquote(video_url)
|
next_url = compat_urllib_parse.unquote(next_url)
|
||||||
|
|
||||||
|
video_url = self._download_webpage(
|
||||||
|
next_url, video_id, note='Retrieving video URL',
|
||||||
|
errnote='Could not retrieve video URL')
|
||||||
age_limit = 18
|
age_limit = 18
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue