1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-02 04:03:18 +08:00

[pornhub] extract uploader path

This commit is contained in:
HubTools 2020-02-11 13:20:06 +13:00
parent f377edec06
commit 5cb8b1a710

View File

@ -65,6 +65,7 @@ class PornHubIE(PornHubBaseIE):
'ext': 'mp4', 'ext': 'mp4',
'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',
'uploader_path': '/channels/babes',
'upload_date': '20130628', 'upload_date': '20130628',
'duration': 361, 'duration': 361,
'view_count': int, 'view_count': int,
@ -83,6 +84,7 @@ class PornHubIE(PornHubBaseIE):
'ext': 'mp4', 'ext': 'mp4',
'title': '重庆婷婷女王足交', 'title': '重庆婷婷女王足交',
'uploader': 'Unknown', 'uploader': 'Unknown',
'uploader_path': '',
'upload_date': '20150213', 'upload_date': '20150213',
'duration': 1753, 'duration': 1753,
'view_count': int, 'view_count': int,
@ -330,6 +332,10 @@ class PornHubIE(PornHubBaseIE):
r'(?s)From:&nbsp;.+?<(?:a\b[^>]+\bhref=["\']/(?:(?:user|channel)s|model|pornstar)/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<', r'(?s)From:&nbsp;.+?<(?:a\b[^>]+\bhref=["\']/(?:(?:user|channel)s|model|pornstar)/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<',
webpage, 'uploader', fatal=False) webpage, 'uploader', fatal=False)
video_uploader_path = self._html_search_regex(
r'(?s)From:&nbsp;\s+?<div\b[^>]+>\s+<(?:a\b[^>]+\bhref=["\'](/(?:(?:user|channel)s|model|pornstar)/[^"]+)")',
webpage, 'uploader_url', fatal=False, default="")
view_count = self._extract_count( view_count = self._extract_count(
r'<span class="count">([\d,\.]+)</span> views', webpage, 'view') r'<span class="count">([\d,\.]+)</span> views', webpage, 'view')
like_count = self._extract_count( like_count = self._extract_count(
@ -349,6 +355,7 @@ class PornHubIE(PornHubBaseIE):
return { return {
'id': video_id, 'id': video_id,
'uploader': video_uploader, 'uploader': video_uploader,
'uploader_path': video_uploader_path,
'upload_date': upload_date, 'upload_date': upload_date,
'title': title, 'title': title,
'thumbnail': thumbnail, 'thumbnail': thumbnail,