mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 00:01:54 +01:00
Compare commits
6 Commits
990df2563d
...
587c458e71
Author | SHA1 | Date | |
---|---|---|---|
|
587c458e71 | ||
|
df8c550abe | ||
|
9ecbbcd844 | ||
|
6887f87208 | ||
|
1138e33ac5 | ||
|
bdceb022d0 |
|
@ -11,6 +11,7 @@ from ..networking.exceptions import HTTPError
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
NO_DEFAULT,
|
NO_DEFAULT,
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
base_url,
|
||||||
clean_html,
|
clean_html,
|
||||||
determine_ext,
|
determine_ext,
|
||||||
format_field,
|
format_field,
|
||||||
|
@ -23,6 +24,7 @@ from ..utils import (
|
||||||
update_url_query,
|
update_url_query,
|
||||||
url_or_none,
|
url_or_none,
|
||||||
urlencode_postdata,
|
urlencode_postdata,
|
||||||
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,12 +139,14 @@ class PornHubIE(PornHubBaseIE):
|
||||||
_EMBED_REGEX = [r'<iframe[^>]+?src=["\'](?P<url>(?:https?:)?//(?:www\.)?pornhub(?:premium)?\.(?:com|net|org)/embed/[\da-z]+)']
|
_EMBED_REGEX = [r'<iframe[^>]+?src=["\'](?P<url>(?:https?:)?//(?:www\.)?pornhub(?:premium)?\.(?:com|net|org)/embed/[\da-z]+)']
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.pornhub.com/view_video.php?viewkey=648719015',
|
'url': 'http://www.pornhub.com/view_video.php?viewkey=648719015',
|
||||||
'md5': 'a6391306d050e4547f62b3f485dd9ba9',
|
'md5': '4d4a4e9178b655776f86cf89ecaf0edf',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '648719015',
|
'id': '648719015',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
|
'thumbnail': r're:^https://.i\.phncdn\.com/videos/201306/28/14084201/original/.*\.jpg',
|
||||||
'title': 'Seductive Indian beauty strips down and fingers her pink pussy',
|
'title': 'Seductive Indian beauty strips down and fingers her pink pussy',
|
||||||
'uploader': 'Babes',
|
'uploader': 'BABES-COM',
|
||||||
|
'uploader_id': '/users/babes-com',
|
||||||
'upload_date': '20130628',
|
'upload_date': '20130628',
|
||||||
'timestamp': 1372447216,
|
'timestamp': 1372447216,
|
||||||
'duration': 361,
|
'duration': 361,
|
||||||
|
@ -207,11 +211,22 @@ class PornHubIE(PornHubBaseIE):
|
||||||
'url': 'http://www.pornhub.com/view_video.php?viewkey=ph601dc30bae19a',
|
'url': 'http://www.pornhub.com/view_video.php?viewkey=ph601dc30bae19a',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'ph601dc30bae19a',
|
'id': 'ph601dc30bae19a',
|
||||||
|
'ext': 'mp4',
|
||||||
'uploader': 'Projekt Melody',
|
'uploader': 'Projekt Melody',
|
||||||
'uploader_id': 'projekt-melody',
|
'uploader_id': 'projekt-melody',
|
||||||
'upload_date': '20210205',
|
'upload_date': '20210205',
|
||||||
'title': '"Welcome to My Pussy Mansion" - CB Stream (02/03/21)',
|
'title': '"Welcome to My Pussy Mansion" - CB Stream (02/03/21)',
|
||||||
'thumbnail': r're:https?://.+',
|
'thumbnail': r're:https?://.+',
|
||||||
|
'age_limit': 18,
|
||||||
|
'view_count': int,
|
||||||
|
'cast': [],
|
||||||
|
'like_count': int,
|
||||||
|
'comment_count': int,
|
||||||
|
'dislike_count': int,
|
||||||
|
'timestamp': 1612564932,
|
||||||
|
'duration': 8173,
|
||||||
|
'categories': list,
|
||||||
|
'tags': list,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'http://www.pornhub.com/view_video.php?viewkey=ph557bbb6676d2d',
|
'url': 'http://www.pornhub.com/view_video.php?viewkey=ph557bbb6676d2d',
|
||||||
|
@ -317,10 +332,10 @@ class PornHubIE(PornHubBaseIE):
|
||||||
r'var\s+flashvars_\d+\s*=\s*({.+?});', webpage, 'flashvars', default='{}'),
|
r'var\s+flashvars_\d+\s*=\s*({.+?});', webpage, 'flashvars', default='{}'),
|
||||||
video_id)
|
video_id)
|
||||||
if flashvars:
|
if flashvars:
|
||||||
subtitle_url = url_or_none(flashvars.get('closedCaptionsFile'))
|
subtitle_url = flashvars.get('closedCaptionsFile')
|
||||||
if subtitle_url:
|
if subtitle_url:
|
||||||
subtitles.setdefault('en', []).append({
|
subtitles.setdefault('en', []).append({
|
||||||
'url': subtitle_url,
|
'url': urljoin(base_url(url), subtitle_url),
|
||||||
'ext': 'srt',
|
'ext': 'srt',
|
||||||
})
|
})
|
||||||
thumbnail = flashvars.get('image_url')
|
thumbnail = flashvars.get('image_url')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user