diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-06-04 15:54:19 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-06-04 15:54:19 +0700 |
commit | cd138d8bd44ad9845453f7a7fa945f9740425809 (patch) | |
tree | 57322215d552c65d15921da75c1cf60d4b191c57 /youtube_dl | |
parent | cd750b731c41cd9e84c7b16f7c22b6a34da18452 (diff) |
[pornhub:playlist] Fix extraction (closes #13281)
Diffstat (limited to 'youtube_dl')
-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 1dcc8df00..d90c6ce1a 100644 --- a/youtube_dl/extractor/pornhub.py +++ b/youtube_dl/extractor/pornhub.py @@ -252,11 +252,14 @@ class PornHubPlaylistBaseIE(InfoExtractor): playlist = self._parse_json( self._search_regex( - r'playlistObject\s*=\s*({.+?});', webpage, 'playlist'), - playlist_id) + r'(?:playlistObject|PLAYLIST_VIEW)\s*=\s*({.+?});', webpage, + 'playlist', default='{}'), + playlist_id, fatal=False) + title = playlist.get('title') or self._search_regex( + r'>Videos\s+in\s+(.+?)\s+[Pp]laylist<', webpage, 'title', fatal=False) return self.playlist_result( - entries, playlist_id, playlist.get('title'), playlist.get('description')) + entries, playlist_id, title, playlist.get('description')) class PornHubPlaylistIE(PornHubPlaylistBaseIE): |