Browse Source

[pornhub:playlist] Fix extraction (closes #13281)

master-ytdl-org
Sergey M․ 8 years ago
parent
commit
cd138d8bd4
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      youtube_dl/extractor/pornhub.py

+ 6
- 3
youtube_dl/extractor/pornhub.py View File

@ -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):


Loading…
Cancel
Save