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 site not having Cache attribute #32943

Closed
peternewell opened this issue Oct 7, 2024 · 5 comments · May be fixed by #31880
Closed

Youtube site not having Cache attribute #32943

peternewell opened this issue Oct 7, 2024 · 5 comments · May be fixed by #31880

Comments

@peternewell
Copy link

Checklist

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

Verbose log

C:\youtube-dl-master>python -m youtube_dl -c -v https://www.youtube.com/watch?v=AscVtYCrhUE
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-c', '-v', 'https://www.youtube.com/watch?v=AscVtYCrhUE']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python 3.12.3 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 - OpenSSL 3.0.13 30 Jan 2024
[debug] exe versions: ffmpeg N-115239-g7b47099bc0-20240516, ffprobe N-115239-g7b47099bc0-20240516
[debug] Proxy map: {}
[youtube] AscVtYCrhUE: Downloading webpage
ERROR: Traceback (most recent call last):
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1606, in inner
    self._player_cache[cache_id] = func(*args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1637, in _decrypt_nsig
    jsi, player_id, func_code = self._extract_n_function_code(video_id, player_url)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1712, in _extract_n_function_code
    func_code = self.cache.load('youtube-nsig', player_id)
                ^^^^^^^^^^
AttributeError: 'YoutubeIE' object has no attribute 'cache'. Did you mean: '_cached'?
 (caused by AttributeError("'YoutubeIE' object has no attribute 'cache'")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1606, in inner
    self._player_cache[cache_id] = func(*args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1637, in _decrypt_nsig
    jsi, player_id, func_code = self._extract_n_function_code(video_id, player_url)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1712, in _extract_n_function_code
    func_code = self.cache.load('youtube-nsig', player_id)
                ^^^^^^^^^^
AttributeError: 'YoutubeIE' object has no attribute 'cache'. Did you mean: '_cached'?
Traceback (most recent call last):
  File "C:\youtube-dl-master\youtube_dl\YoutubeDL.py", line 859, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\YoutubeDL.py", line 955, in __extract_info
    ie_result = ie.extract(url)
                ^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\common.py", line 565, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 2137, in _real_extract
    self._unthrottle_format_urls(video_id, player_url, dct)
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1754, in _unthrottle_format_urls
    n_response = decrypt_nsig(n_param)(n_param, video_id, player_url)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1614, in inner
    raise ret
youtube_dl.utils.ExtractorError: Traceback (most recent call last):
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1606, in inner
    self._player_cache[cache_id] = func(*args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1637, in _decrypt_nsig
    jsi, player_id, func_code = self._extract_n_function_code(video_id, player_url)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\youtube-dl-master\youtube_dl\extractor\youtube.py", line 1712, in _extract_n_function_code
    func_code = self.cache.load('youtube-nsig', player_id)
                ^^^^^^^^^^
AttributeError: 'YoutubeIE' object has no attribute 'cache'. Did you mean: '_cached'?
 (caused by AttributeError("'YoutubeIE' object has no attribute 'cache'")); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

This site has just stopped working.

It never required the Cache attribute previously.

Any suggestions as to how to fix?

@dirkf
Copy link
Contributor

dirkf commented Oct 7, 2024

Your installation is not expected to work. Review #30839 for more information. Until the issue is fixed you may need to work around #32905 when accessing YT.

@peternewell
Copy link
Author

Thanks for that, I will work through it and see what I come up with.

As a small update, I downloaded and installed the nightly release 2024.08.07, and when I ran it I couldn't download anything from SBS.

Once I installed the attached file, it seemed then to work ok. (remove the txt suffix).

So I am wondering if the nightly repository is up to date?

sbs.py_new_file_working_2024.py.txt

@dirkf
Copy link
Contributor

dirkf commented Oct 8, 2024

The nightly build includes all the commits to the master branch. The PR for SBS needs to be checked and then merged. I think the tests were failing last year and so it didn't progress. Assistance from anyone in-region would be appreciated (I'll post in the PR and link it here).

@dirkf
Copy link
Contributor

dirkf commented Oct 9, 2024

As above, see #31880 (comment).

@dirkf
Copy link
Contributor

dirkf commented Oct 11, 2024

From the comment in the PR, OP has a working program now.

@dirkf dirkf closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
@dirkf dirkf linked a pull request Oct 15, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants