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

YoutubeYtBe extraction not working using Python 2, <3.6 #27572

Closed
5 tasks done
windom opened this issue Dec 29, 2020 · 0 comments
Closed
5 tasks done

YoutubeYtBe extraction not working using Python 2, <3.6 #27572

windom opened this issue Dec 29, 2020 · 0 comments

Comments

@windom
Copy link
Contributor

windom commented Dec 29, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.12.29
  • 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: [u'-v', u'https://youtu.be/yeWKywCrFtk?list=PL2qgrgXsNUG5ig9cat4ohreBjYLAPC0J5']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.12.29
[debug] Git HEAD: 479cc6d5a
[debug] Python version 2.7.16 (CPython) - Darwin-20.2.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: no suitable InfoExtractor for URL https://www.youtube.com/watch?list=PL2qgrgXsNUG5ig9cat4ohreBjYLAPC0J5&feature=youtu.be&v=yeWKywCrFtk
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/windom/tenta/youtube-dl/youtube_dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "youtube_dl/YoutubeDL.py", line 2029, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "youtube_dl/YoutubeDL.py", line 796, in extract_info
    return self.__extract_info(url, ie, download, extra_info, process)
  File "youtube_dl/YoutubeDL.py", line 803, in wrapper
    return func(self, *args, **kwargs)
  File "youtube_dl/YoutubeDL.py", line 835, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "youtube_dl/YoutubeDL.py", line 876, in process_ie_result
    extra_info=extra_info)
  File "youtube_dl/YoutubeDL.py", line 798, in extract_info
    self.report_error('no suitable InfoExtractor for URL %s' % url)
  File "youtube_dl/YoutubeDL.py", line 625, in report_error
    self.trouble(error_message, tb)
  File "youtube_dl/YoutubeDL.py", line 587, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Description

The test URL for YoutubeYtBeIE results in the exception above when using Python2, but works in Python 3.

I think the root cause is in YoutubeYtBeIE._real_extract, where the update_url_query call will make an URL in which v, list and feature will be in nondeterministic order using Python2. Some orderings result in URLs which won't be matched by any of the Youtube extractors.

Since Python 3.6+ has insertion iteration order this is not a problem there.

@dstftw dstftw closed this as completed in 0615913 Apr 16, 2021
github-actions bot added a commit to hellopony/youtube-dl that referenced this issue Apr 16, 2021
* https://github.com/ytdl-org/youtube-dl:
  [youtube] Improve stretch extraction and fix stretched ratio calculation (closes ytdl-org#28769)
  [youtube:tab] Improve grid extraction (closes ytdl-org#28725)
  [youtube:tab] Detect series playlist on playlists page (closes ytdl-org#28723)
  [youtube] Add more invidious instances (ytdl-org#28706)
  [pluralsight] Extend anti-throttling timeout (ytdl-org#28712)
  [youtube] Improve URL to extractor routing (closes ytdl-org#27572, closes ytdl-org#28335, closes ytdl-org#28742)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant