projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
09322cc
)
[pornhub:uservideos] Add support for new URLs (closes #17388)
author
Sergey M․
<dstftw@gmail.com>
Wed, 5 Sep 2018 17:51:20 +0000
(
00:51
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 5 Sep 2018 17:51:20 +0000
(
00:51
+0700)
youtube_dl/extractor/pornhub.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornhub.py
b/youtube_dl/extractor/pornhub.py
index ffc4405a83d3328b76f6b53fc852f5858a3765b4..6782848d90c289d02aeef76bb2d0925351d64121 100644
(file)
--- a/
youtube_dl/extractor/pornhub.py
+++ b/
youtube_dl/extractor/pornhub.py
@@
-254,7
+254,7
@@
class PornHubIE(InfoExtractor):
self._sort_formats(formats)
video_uploader = self._html_search_regex(
self._sort_formats(formats)
video_uploader = self._html_search_regex(
- r'(?s)From: .+?<(?:a\b[^>]+\bhref=["\']/(?:
user|channel)s
/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<',
+ r'(?s)From: .+?<(?:a\b[^>]+\bhref=["\']/(?:
(?:user|channel)s|model|pornstar)
/|span\b[^>]+\bclass=["\']username)[^>]+>(.+?)<',
webpage, 'uploader', fatal=False)
view_count = self._extract_count(
webpage, 'uploader', fatal=False)
view_count = self._extract_count(
@@
-346,7
+346,7
@@
class PornHubPlaylistIE(PornHubPlaylistBaseIE):
class PornHubUserVideosIE(PornHubPlaylistBaseIE):
class PornHubUserVideosIE(PornHubPlaylistBaseIE):
- _VALID_URL = r'https?://(?:[^/]+\.)?pornhub\.com/(?:
user|channel)s
/(?P<id>[^/]+)/videos'
+ _VALID_URL = r'https?://(?:[^/]+\.)?pornhub\.com/(?:
(?:user|channel)s|model|pornstar)
/(?P<id>[^/]+)/videos'
_TESTS = [{
'url': 'http://www.pornhub.com/users/zoe_ph/videos/public',
'info_dict': {
_TESTS = [{
'url': 'http://www.pornhub.com/users/zoe_ph/videos/public',
'info_dict': {
@@
-378,6
+378,12
@@
class PornHubUserVideosIE(PornHubPlaylistBaseIE):
}, {
'url': 'http://www.pornhub.com/users/zoe_ph/videos/public',
'only_matching': True,
}, {
'url': 'http://www.pornhub.com/users/zoe_ph/videos/public',
'only_matching': True,
+ }, {
+ 'url': 'https://www.pornhub.com/model/jayndrea/videos/upload',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://www.pornhub.com/pornstar/jenny-blighe/videos/upload',
+ 'only_matching': True,
}]
def _real_extract(self, url):
}]
def _real_extract(self, url):