mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-03 00:42:51 +08:00
Fix for 16262 that does not break single video loading...
Moved the fix to the end of the playlist loading/user loading
This commit is contained in:
parent
c7b455b9b4
commit
fd544ee5b6
@ -115,9 +115,6 @@ class PornHubIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
# playlist loading can lead to cookies here, interferring with platform settings
|
|
||||||
self._downloader.cookiejar.clear('.pornhub.com')
|
|
||||||
|
|
||||||
self._set_cookie('pornhub.com', 'age_verified', '1')
|
self._set_cookie('pornhub.com', 'age_verified', '1')
|
||||||
|
|
||||||
def dl_webpage(platform):
|
def dl_webpage(platform):
|
||||||
@ -262,6 +259,9 @@ class PornHubPlaylistBaseIE(InfoExtractor):
|
|||||||
title = playlist.get('title') or self._search_regex(
|
title = playlist.get('title') or self._search_regex(
|
||||||
r'>Videos\s+in\s+(.+?)\s+[Pp]laylist<', webpage, 'title', fatal=False)
|
r'>Videos\s+in\s+(.+?)\s+[Pp]laylist<', webpage, 'title', fatal=False)
|
||||||
|
|
||||||
|
# list loading can lead to cookies in .pornhub.com, interferring with platform settings when loading the pages
|
||||||
|
self._downloader.cookiejar.clear('.pornhub.com')
|
||||||
|
|
||||||
return self.playlist_result(
|
return self.playlist_result(
|
||||||
entries, playlist_id, title, playlist.get('description'))
|
entries, playlist_id, title, playlist.get('description'))
|
||||||
|
|
||||||
@ -334,4 +334,7 @@ class PornHubUserVideosIE(PornHubPlaylistBaseIE):
|
|||||||
break
|
break
|
||||||
entries.extend(page_entries)
|
entries.extend(page_entries)
|
||||||
|
|
||||||
|
# list loading can lead to cookies in .pornhub.com, interferring with platform settings when loading the pages
|
||||||
|
self._downloader.cookiejar.clear('.pornhub.com')
|
||||||
|
|
||||||
return self.playlist_result(entries, user_id)
|
return self.playlist_result(entries, user_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user