[youtube] Fixed 'next_link' regular expression

This commit is contained in:
Joel Potts 2020-07-29 15:02:59 +02:00
parent e8c5d40bc8
commit 68073607e0
1 changed files with 1 additions and 1 deletions

View File

@ -3213,7 +3213,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