projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd750b7
)
[pornhub:playlist] Fix extraction (closes #13281)
author
Sergey M․
<dstftw@gmail.com>
Sun, 4 Jun 2017 08:54:19 +0000
(15:54 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 4 Jun 2017 08:54:19 +0000
(15:54 +0700)
youtube_dl/extractor/pornhub.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/pornhub.py
b/youtube_dl/extractor/pornhub.py
index 1dcc8df00b4c2eb2da3b2719a35d874eb290c4ed..d90c6ce1adc8cabd3a9e3a4229e02b0bbcc41182 100644
(file)
--- 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(
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(
return self.playlist_result(
- entries, playlist_id,
playlist.get('title')
, playlist.get('description'))
+ entries, playlist_id,
title
, playlist.get('description'))
class PornHubPlaylistIE(PornHubPlaylistBaseIE):
class PornHubPlaylistIE(PornHubPlaylistBaseIE):