diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-03-28 00:32:57 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-03-28 00:32:57 +0600 |
commit | 3a23bae9ccf11c9c114d2d27e4fbc09fb0bbeafe (patch) | |
tree | dd2500baafe83d7277cd05e10d5c8b16a1971f28 /youtube_dl/extractor | |
parent | 8f9a477e7f260d60836843fbe8f75629e3ae8892 (diff) |
[pornhub:playlistbase] Do not include videos not from playlist
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/pornhub.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/youtube_dl/extractor/pornhub.py b/youtube_dl/extractor/pornhub.py index 670e9294a..b3bf81a13 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -150,9 +150,12 @@ class PornHubIE(InfoExtractor): class PornHubPlaylistBaseIE(InfoExtractor): def _extract_entries(self, webpage): return [ - self.url_result('http://www.pornhub.com/%s' % video_url, PornHubIE.ie_key()) - for video_url in orderedSet(re.findall( - r'href="/?(view_video\.php\?.*\bviewkey=[\da-z]+[^"]*)"', webpage)) + self.url_result( + 'http://www.pornhub.com/%s' % video_url, + PornHubIE.ie_key(), video_title=title) + for video_url, title in orderedSet(re.findall( + r'href="/?(view_video\.php\?.*\bviewkey=[\da-z]+[^"]*)"[^>]*\s+title="([^"]+)"', + webpage)) ] def _real_extract(self, url): |