Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[youtube] Regular expression for finding next page of search results is outdated. #26161

Open
RedpointsBots opened this issue Jul 29, 2020 · 1 comment

Comments

@RedpointsBots
Copy link

@RedpointsBots RedpointsBots commented Jul 29, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.07.28
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'ytsearchdate50:the']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.7.5 (CPython) - Linux-4.15.0-112-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Proxy map: {}
[youtube:search:date] query "the": Downloading page 1
[download] Downloading playlist: the
[youtube:search:date] playlist the: Collected 20 video ids (downloading 20 of them)
[download] Downloading video 1 of 20

Description

The regular expression used to find the next page link in the results is currently not working. As a result, regardless of how many results you specify there is a limit to 20 results (the number of results on the first page).

The regex, found here should be:
r'href="(/results\?[^"]*\b(?:sp=[^"]+)?)"[^>]*>\s*<span[^>]+class="[^"]*\byt-uix-button-content\b[^"]*"[^>]*>Next'. I left in the incorrect part as optional, for any backwards compatibility issues.

@RedpointsBots
Copy link
Author

@RedpointsBots RedpointsBots commented Jul 29, 2020

I have created a pull request for this issue: #26163.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.