1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

Fixed broken next page parsing

Added changes from this pull request for broken next page parsing:
https://github.com/ytdl-org/youtube-dl/pull/26163
This commit is contained in:
Crypto90 2020-07-30 09:26:58 +02:00 committed by GitHub
parent c303cb7efd
commit 677de2d478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3217,7 +3217,7 @@ class YoutubeSearchIE(SearchInfoExtractor, YoutubeSearchBaseInfoExtractor):
if not new_videos or len(videos) > limit:
break
next_link = self._html_search_regex(
r'href="(/results\?[^"]*\bsp=[^"]+)"[^>]*>\s*<span[^>]+class="[^"]*\byt-uix-button-content\b[^"]*"[^>]*>Next',
r'href="(/results\?[^"]*\b(?:sp=[^"]+)?)"[^>]*>\s*<span[^>]+class="[^"]*\byt-uix-button-content\b[^"]*"[^>]*>Next',
html_content, 'next link', default=None)
if next_link is None:
break