spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
16.95k stars 1.56k forks source link

AudioProviderError: YT-DLP download error #1742

Closed otohime-inari closed 1 year ago

otohime-inari commented 1 year ago

System OS

Windows

Python Version

3.7 (CPython)

Install Source

GitHub

Install version / commit hash

4.0.7

Expected Behavior vs Actual Behavior

No response

Steps to reproduce - Ensure to include actual links!

https://open.spotify.com/track/6o7hRe4cXjf4cAF1q41b1J?si=ae85ebec76a7440e

Traceback

PS C:\Apps\youtube-dl> ./spotdl.exe https://open.spotify.com/track/6o7hRe4cXjf4cAF1q41b1J?si=ae85ebec76a7440e --log-level DEBUG
Downloader initialized
Found lyrics for Dead by April - Wasteland on Genius
Downloading Dead by April - Wasteland using https://www.youtube.com/watch?v=nsUTgJoj4_A, audio provider: YouTubeMusic
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1502, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1578, in __extract_info
  File "yt_dlp\extractor\common.py", line 680, in extract
  File "yt_dlp\extractor\youtube.py", line 4049, in _real_extract
  File "yt_dlp\extractor\common.py", line 1228, in _search_regex
yt_dlp.utils.RegexNotFoundError:  nsUTgJoj4_A: Unable to extract uploader id; please report this issue on
https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest
version using  yt-dlp -U

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "spotdl\providers\audio\base.py", line 152, in get_download_metadata
  File "yt_dlp\YoutubeDL.py", line 1491, in extract_info
  File "yt_dlp\YoutubeDL.py", line 1520, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1012, in report_error
  File "yt_dlp\YoutubeDL.py", line 932, in trouble
  File "yt_dlp\YoutubeDL.py", line 880, in to_stderr
  File "spotdl\providers\audio\base.py", line 43, in error
spotdl.providers.audio.base.AudioProviderError: ERROR:  nsUTgJoj4_A: Unable to extract uploader id; please report this
issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on
the latest version using  yt-dlp -U

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "spotdl\download\downloader.py", line 427, in search_and_download
  File "spotdl\providers\audio\base.py", line 157, in get_download_metadata
spotdl.providers.audio.base.AudioProviderError: YT-DLP download error - https://www.youtube.com/watch?v=nsUTgJoj4_A

AudioProviderError: YT-DLP download error - https://www.youtube.com/watch?v=nsUTgJoj4_A

Other details

No response

Uninen commented 1 year ago

It would help if the yt-dlp dep was pinned more loosely. The latest version (2023.2.17) seems to work with spotify-downloader and fix at least some of these issues but it's hard to install with most tools bc the dependency is pinned to earlier version.

wyldcrd commented 1 year ago

Does spotdl use yt-dlp? Confusing me

Nadav42 commented 1 year ago

happened to me as well, I can confirm upgrading yt-dlp to 2023.02.17 fixes this issue

Squidoodoo commented 1 year ago

Had some problems updating yt-dlp to v2023 manually, it did not work and was automatically uninstalled by spot-dl when I tried to update spot-dl, but pip uninstall spotdl pip install spotdl fixed it for me i dunno 🤷‍♂️

xnetcat commented 1 year ago

fixed in v4.1.0, please update to the latest yt-dlp with pip install -U yt-dlp spotdl

cashiecoder commented 1 year ago

@Squidoodoo those commands worked perfectly for me. Thank you!

Willbeto commented 11 months ago

This problem still exists, is there any better way?

reppson commented 8 months ago

Getting this error as well every time since 2 days. Anyone has an workaround? Is it possible that my IP was blocked by Youtube because i downloaded many songs?

andystumpf commented 8 months ago

Same here as @reppson .
AudioProviderError: YT-DLP download error -

ryndshn commented 7 months ago

pretty sure this happens when downloading large playlists--seems like rate limiting on youtube's side

edit: I no longer think this is rate-limiting. I'm able to just start the download and it continues

Fabiejan commented 6 months ago

I'm having the same issue as of this afternoon. Was still working before. I'm not downloading large lists but just one of 33 songs. It's happening on different playlists as well.

I have tried update and reinstalling SpotDL but it's not helping.

borja190898 commented 6 months ago

Any news? Thanks

Fabiejan commented 6 months ago

It resolved itself, couple days later just worked again

GameBreaker75 commented 4 months ago

I'm having this issue myself, should I just wait it out?

Rumirad64 commented 3 months ago

if you are on a VPN try disconnecting it

juanes-Z commented 2 months ago

Rumirad64 has it right! i disabled my firewall and adblocker and all the things, but forgot to try turning off my VPN. thank you!

ZenKyma commented 2 months ago

Still get this error with spotdl-4.2.5-win32.exe:

C:\Users\timof\Downloads>spotdl --bitrate disable "Coolio - Gangsta's Paradise"
Processing query: Coolio - Gangsta's Paradise
AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=-5qqrMu_AZc
FaNt4zMa commented 2 months ago

Same here, seems like something broke on YT-DLP's side but I haven't seen any tickets opened regarding this yet. Both CLI and prebuilt exe are broken, spitting out this error everytime:

AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=IA7yHvUwrCU 

I tried updating yt-dlp manually to the latest release and nothing changed. If someone could investigate that would be nice

joaquinito2070 commented 2 months ago

Wait until we will release 4.3.0 of SpotDL.

FaNt4zMa commented 2 months ago

@joaquinito2070 Does 4.3.0 fixes the hardcoded port? Ever since 4.2.1, reverse proxy setup were broken due to this. I use the latest release on my PC but my server runs 4.2.0 behind a reverse proxy so I can download music to my Jellyfin from outside network..

ZenKyma commented 2 months ago

Are there any build instructions for installing the master branch?

FaNt4zMa commented 2 months ago

Wait until we will release 4.3.0 of SpotDL.

Do you know whats the issue here? I tried doing some digging around myself and found that YT-DLP is not actually broken as I can use it just fine. But for some reason SpotDL is brokey :( I turned on DEBUG logs and ran a simple command, here's the output, if that can help:

~  spotdl download https://open.spotify.com/track/55u5QIlEuzCipJBtZPdJio?si=2f568894cd5649ab
[01:36:20] DEBUG    MainThread - Downloader settings: {'audio_providers': ['youtube-music',            downloader.py:131
                    'slider-kz'], 'lyrics_providers': ['synced', 'genius', 'azlyrics', 'musixmatch'],
                    'playlist_numbering': False, 'scan_for_songs': False, 'm3u': None, 'output':
                    'D:\\Media\\Music\\Albums\\{artist} - {album}\\{artists} - {title}.{output-ext}',
                    'overwrite': 'skip', 'search_query': None, 'ffmpeg': 'ffmpeg', 'bitrate':
                    'disable', 'ffmpeg_args': None, 'format': 'opus', 'save_file': None,
                    'filter_results': True, 'album_type': None, 'threads': 8, 'cookie_file':
                    'cookies.txt', 'restrict': False, 'print_errors': False, 'sponsor_block': False,
                    'preload': False, 'archive': None, 'load_config': True, 'log_level': 'DEBUG',
                    'simple_tui': False, 'fetch_albums': False, 'id3_separator': '/', 'ytm_data':
                    False, 'add_unavailable': False, 'generate_lrc': False, 'force_update_metadata':
                    False, 'only_verified_results': False, 'sync_without_deleting': False,
                    'max_filename_length': None, 'yt_dlp_args': None, 'detect_formats': None,
                    'save_errors': None, 'ignore_albums': None, 'proxy': None, 'skip_explicit': False,
                    'log_format': None, 'redownload': False, 'skip_album_art': False,
                    'create_skip_file': False, 'respect_skip_file': False}
[01:36:20] DEBUG    MainThread - FFmpeg path: ffmpeg                                                   downloader.py:149
[01:36:20] DEBUG    MainThread - Found 0 known songs                                                   downloader.py:184
[01:36:22] DEBUG    MainThread - Archive: 0 urls                                                       downloader.py:231
[01:36:22] DEBUG    MainThread - Downloader initialized                                                downloader.py:233
[01:36:22] INFO     MainThread - Processing query:                                                         search.py:137
                    https://open.spotify.com/track/55u5QIlEuzCipJBtZPdJio?si=2f568894cd5649ab
[01:36:22] DEBUG    MainThread - Found 1 songs in 0 lists                                                  search.py:339
[01:36:22] DEBUG    MainThread - Downloading 1 songs                                                   downloader.py:280
[01:36:23] DEBUG    asyncio_0 - Found lyrics for Eminem - Renaissance on Synced                        downloader.py:400
[01:36:23] DEBUG    asyncio_0 - [55u5QIlEuzCipJBtZPdJio] Searching for eminem - renaissance                  base.py:167
[01:36:23] DEBUG    asyncio_0 - [55u5QIlEuzCipJBtZPdJio] Found 1 results for ISRC USUG12403402               base.py:180
[01:36:23] DEBUG    asyncio_0 - [55u5QIlEuzCipJBtZPdJio] Filtered to 1 ISRC results                          base.py:192
[01:36:23] DEBUG    asyncio_0 - [55u5QIlEuzCipJBtZPdJio] Best ISRC result is                                 base.py:201
                    https://music.youtube.com/watch?v=IA7yHvUwrCU with score 100.0
[01:36:23] DEBUG    asyncio_0 - Downloading Eminem - Renaissance using                                 downloader.py:654
                    https://music.youtube.com/watch?v=IA7yHvUwrCU
[01:36:25] DEBUG    asyncio_0 - ERROR: unable to download video data: HTTP Error 403: Forbidden              base.py:374
[01:36:25] ERROR    asyncio_0 - Traceback (most recent call last):                               progress_handler.py:358
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 3448, in process_info
                        success, real_download = self.dl(temp_filename, info_dict)
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 3169, in dl
                        return fd.download(name, new_info, subtitle)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\downloader\common.py", line 466, in download
                        ret = self.real_download(filename, info_dict)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\downloader\http.py", line 369, in real_download
                        establish_connection()
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\downloader\http.py", line 120, in establish_connection
                        ctx.data = self.ydl.urlopen(request)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 4131, in urlopen
                        return self._request_director.send(req)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\networking\common.py", line 115, in send
                        response = handler.send(request)
                                   ^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\networking\_helper.py", line 208, in wrapper
                        return func(self, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\networking\common.py", line 335, in send
                        return self._send(request)
                               ^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\networking\_requests.py", line 350, in _send
                        raise HTTPError(res, redirect_loop=max_redirects_exceeded)
                    yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

                    During handling of the above exception, another exception occurred:

                    Traceback (most recent call last):
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\s
                    potdl\providers\audio\base.py", line 369, in get_download_metadata
                        data = self.audio_handler.extract_info(url, download=download)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 1595, in extract_info
                        return self.__extract_info(url, self.get_info_extractor(key), download,
                    extra_info, process)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    ^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 1606, in wrapper
                        return func(self, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 1762, in __extract_info
                        return self.process_ie_result(ie_result, download, extra_info)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 1821, in process_ie_result
                        ie_result = self.process_video_result(ie_result, download=download)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 2982, in process_video_result
                        self.process_info(new_info)
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 3457, in process_info
                        self.report_error('unable to download video data: %s' %
                    error_to_compat_str(err))
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 1073, in report_error
                        self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)}
                    {message}', *args, **kwargs)
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 992, in trouble
                        self.to_stderr(message)
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\y
                    t_dlp\YoutubeDL.py", line 932, in to_stderr
                        self.params['logger'].error(message)
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\s
                    potdl\providers\audio\base.py", line 57, in error
                        raise AudioProviderError(msg)
                    spotdl.providers.audio.base.AudioProviderError: ERROR: unable to download
                    video data: HTTP Error 403: Forbidden

                    The above exception was the direct cause of the following exception:

                    Traceback (most recent call last):
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\s
                    potdl\download\downloader.py", line 661, in search_and_download
                        download_info = audio_downloader.get_download_metadata(
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File
                    "C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-packages\s
                    potdl\providers\audio\base.py", line 375, in get_download_metadata
                        raise AudioProviderError(f"YT-DLP download error - {url}") from
                    exception
                    spotdl.providers.audio.base.AudioProviderError: YT-DLP download error -
                    https://music.youtube.com/watch?v=IA7yHvUwrCU

                    ╭─────────────────── Traceback (most recent call last) ────────────────────╮
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:3448 in process_info                               │
                    │                                                                          │
                    │   3445 │   │   │   │   │   if dl_filename is None or dl_filename == temp │
                    │   3446 │   │   │   │   │   │   # dl_filename == temp_filename could mean │
                    │        partially downloaded with --no-part.                              │
                    │   3447 │   │   │   │   │   │   # So we should try to resume the download │
                    │ ❱ 3448 │   │   │   │   │   │   success, real_download = self.dl(temp_fil │
                    │   3449 │   │   │   │   │   │   info_dict['__real_download'] = real_downl │
                    │   3450 │   │   │   │   │   else:                                         │
                    │   3451 │   │   │   │   │   │   self.report_file_already_downloaded(dl_fi │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:3169 in dl                                         │
                    │                                                                          │
                    │   3166 │   │   new_info = self._copy_infodict(info)                      │
                    │   3167 │   │   if new_info.get('http_headers') is None:                  │
                    │   3168 │   │   │   new_info['http_headers'] = self._calc_headers(new_inf │
                    │ ❱ 3169 │   │   return fd.download(name, new_info, subtitle)              │
                    │   3170 │                                                                 │
                    │   3171 │   def existing_file(self, filepaths, *, default_overwrite=True) │
                    │   3172 │   │   existing_files = list(filter(os.path.exists, orderedSet(f │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\downloader\common.py:466 in download                            │
                    │                                                                          │
                    │   463 │   │   │   self.to_screen(f'[download] Sleeping {sleep_interval:. │
                    │   464 │   │   │   time.sleep(sleep_interval)                             │
                    │   465 │   │                                                              │
                    │ ❱ 466 │   │   ret = self.real_download(filename, info_dict)              │
                    │   467 │   │   self._finish_multiline_status()                            │
                    │   468 │   │   return ret, True                                           │
                    │   469                                                                    │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\downloader\http.py:369 in real_download                         │
                    │                                                                          │
                    │   366 │   │                                                              │
                    │   367 │   │   for retry in RetryManager(self.params.get('retries'), self │
                    │   368 │   │   │   try:                                                   │
                    │ ❱ 369 │   │   │   │   establish_connection()                             │
                    │   370 │   │   │   │   return download()                                  │
                    │   371 │   │   │   except RetryDownload as err:                           │
                    │   372 │   │   │   │   retry.error = err.source_error                     │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\downloader\http.py:120 in establish_connection                  │
                    │                                                                          │
                    │   117 │   │   │   │   request.headers['Range'] =                         │
                    │       f'bytes={int(range_start)}-{int_or_none(range_end) or ""}'         │
                    │   118 │   │   │   # Establish connection                                 │
                    │   119 │   │   │   try:                                                   │
                    │ ❱ 120 │   │   │   │   ctx.data = self.ydl.urlopen(request)               │
                    │   121 │   │   │   │   # When trying to resume, Content-Range HTTP header │
                    │       checked                                                            │
                    │   122 │   │   │   │   # to match the value of requested Range HTTP heade │
                    │       webservers                                                         │
                    │   123 │   │   │   │   # that don't support resuming and serve a whole fi │
                    │       Content-Range                                                      │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:4131 in urlopen                                    │
                    │                                                                          │
                    │   4128 │   │   clean_headers(req.headers)                                │
                    │   4129 │   │                                                             │
                    │   4130 │   │   try:                                                      │
                    │ ❱ 4131 │   │   │   return self._request_director.send(req)               │
                    │   4132 │   │   except NoSupportingHandlers as e:                         │
                    │   4133 │   │   │   for ue in e.unsupported_errors:                       │
                    │   4134 │   │   │   │   # FIXME: This depends on the order of errors.     │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\networking\common.py:115 in send                                │
                    │                                                                          │
                    │   112 │   │   │                                                          │
                    │   113 │   │   │   self._print_verbose(f'Sending request via "{handler.RH │
                    │   114 │   │   │   try:                                                   │
                    │ ❱ 115 │   │   │   │   response = handler.send(request)                   │
                    │   116 │   │   │   except RequestError:                                   │
                    │   117 │   │   │   │   raise                                              │
                    │   118 │   │   │   except Exception as e:                                 │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\networking\_helper.py:208 in wrapper                            │
                    │                                                                          │
                    │   205 │   @functools.wraps(func)                                         │
                    │   206 │   def wrapper(self, *args, **kwargs):                            │
                    │   207 │   │   try:                                                       │
                    │ ❱ 208 │   │   │   return func(self, *args, **kwargs)                     │
                    │   209 │   │   except UnsupportedRequest as e:                            │
                    │   210 │   │   │   if e.handler is None:                                  │
                    │   211 │   │   │   │   e.handler = self                                   │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\networking\common.py:335 in send                                │
                    │                                                                          │
                    │   332 │   def send(self, request: Request) -> Response:                  │
                    │   333 │   │   if not isinstance(request, Request):                       │
                    │   334 │   │   │   raise TypeError('Expected an instance of Request')     │
                    │ ❱ 335 │   │   return self._send(request)                                 │
                    │   336 │                                                                  │
                    │   337 │   @abc.abstractmethod                                            │
                    │   338 │   def _send(self, request: Request):                             │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\networking\_requests.py:350 in _send                            │
                    │                                                                          │
                    │   347 │   │   res = RequestsResponseAdapter(requests_res)                │
                    │   348 │   │                                                              │
                    │   349 │   │   if not 200 <= res.status < 300:                            │
                    │ ❱ 350 │   │   │   raise HTTPError(res, redirect_loop=max_redirects_excee │
                    │   351 │   │                                                              │
                    │   352 │   │   return res                                                 │
                    │   353                                                                    │
                    ╰──────────────────────────────────────────────────────────────────────────╯
                    HTTPError: HTTP Error 403: Forbidden

                    During handling of the above exception, another exception occurred:

                    ╭─────────────────── Traceback (most recent call last) ────────────────────╮
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\spotdl\providers\audio\base.py:369 in get_download_metadata            │
                    │                                                                          │
                    │   366 │   │   """                                                        │
                    │   367 │   │                                                              │
                    │   368 │   │   try:                                                       │
                    │ ❱ 369 │   │   │   data = self.audio_handler.extract_info(url, download=d │
                    │   370 │   │   │                                                          │
                    │   371 │   │   │   if data:                                               │
                    │   372 │   │   │   │   return data                                        │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:1595 in extract_info                               │
                    │                                                                          │
                    │   1592 │   │   │   │   if self.params.get('break_on_existing', False):   │
                    │   1593 │   │   │   │   │   raise ExistingVideoReached()                  │
                    │   1594 │   │   │   │   break                                             │
                    │ ❱ 1595 │   │   │   return self.__extract_info(url, self.get_info_extract │
                    │        extra_info, process)                                              │
                    │   1596 │   │   else:                                                     │
                    │   1597 │   │   │   extractors_restricted = self.params.get('allowed_extr │
                    │        ['default'])                                                      │
                    │   1598 │   │   │   self.report_error(f'No suitable extractor{format_fiel │
                    │        (%s)")} found for URL {url}',                                     │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:1606 in wrapper                                    │
                    │                                                                          │
                    │   1603 │   │   def wrapper(self, *args, **kwargs):                       │
                    │   1604 │   │   │   while True:                                           │
                    │   1605 │   │   │   │   try:                                              │
                    │ ❱ 1606 │   │   │   │   │   return func(self, *args, **kwargs)            │
                    │   1607 │   │   │   │   except (DownloadCancelled, LazyList.IndexError, P │
                    │   1608 │   │   │   │   │   raise                                         │
                    │   1609 │   │   │   │   except ReExtractInfo as e:                        │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:1762 in __extract_info                             │
                    │                                                                          │
                    │   1759 │   │   self.add_default_extra_info(ie_result, ie, url)           │
                    │   1760 │   │   if process:                                               │
                    │   1761 │   │   │   self._wait_for_video(ie_result)                       │
                    │ ❱ 1762 │   │   │   return self.process_ie_result(ie_result, download, ex │
                    │   1763 │   │   else:                                                     │
                    │   1764 │   │   │   return ie_result                                      │
                    │   1765                                                                   │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:1821 in process_ie_result                          │
                    │                                                                          │
                    │   1818 │   │                                                             │
                    │   1819 │   │   if result_type == 'video':                                │
                    │   1820 │   │   │   self.add_extra_info(ie_result, extra_info)            │
                    │ ❱ 1821 │   │   │   ie_result = self.process_video_result(ie_result, down │
                    │   1822 │   │   │   self._raise_pending_errors(ie_result)                 │
                    │   1823 │   │   │   additional_urls = (ie_result or {}).get('additional_u │
                    │   1824 │   │   │   if additional_urls:                                   │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:2982 in process_video_result                       │
                    │                                                                          │
                    │   2979 │   │   │   │   │   })                                            │
                    │   2980 │   │   │   │   downloaded_formats.append(new_info)               │
                    │   2981 │   │   │   │   try:                                              │
                    │ ❱ 2982 │   │   │   │   │   self.process_info(new_info)                   │
                    │   2983 │   │   │   │   except MaxDownloadsReached:                       │
                    │   2984 │   │   │   │   │   max_downloads_reached = True                  │
                    │   2985 │   │   │   │   self._raise_pending_errors(new_info)              │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:3457 in process_info                               │
                    │                                                                          │
                    │   3454 │   │   │   │   info_dict['__finaldir'] =                         │
                    │        os.path.dirname(os.path.abspath(encodeFilename(full_filename)))   │
                    │   3455 │   │   │                                                         │
                    │   3456 │   │   │   except network_exceptions as err:                     │
                    │ ❱ 3457 │   │   │   │   self.report_error('unable to download video data: │
                    │        error_to_compat_str(err))                                         │
                    │   3458 │   │   │   │   return                                            │
                    │   3459 │   │   │   except OSError as err:                                │
                    │   3460 │   │   │   │   raise UnavailableVideoError(err)                  │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:1073 in report_error                               │
                    │                                                                          │
                    │   1070 │   │   Do the same as trouble, but prefixes the message with 'ER │
                    │   1071 │   │   in red if stderr is a tty file.                           │
                    │   1072 │   │   '''                                                       │
                    │ ❱ 1073 │   │   self.trouble(f'{self._format_err("ERROR:", self.Styles.ER │
                    │        *args, **kwargs)                                                  │
                    │   1074 │                                                                 │
                    │   1075 │   def write_debug(self, message, only_once=False):              │
                    │   1076 │   │   '''Log debug message or Print message to stderr'''        │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:992 in trouble                                     │
                    │                                                                          │
                    │    989 │   │   @param is_error    Whether to raise error according to ig │
                    │    990 │   │   """                                                       │
                    │    991 │   │   if message is not None:                                   │
                    │ ❱  992 │   │   │   self.to_stderr(message)                               │
                    │    993 │   │   if self.params.get('verbose'):                            │
                    │    994 │   │   │   if tb is None:                                        │
                    │    995 │   │   │   │   if sys.exc_info()[0]:  # if .trouble has been cal │
                    │        block                                                             │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\yt_dlp\YoutubeDL.py:932 in to_stderr                                   │
                    │                                                                          │
                    │    929 │   │   """Print message to stderr"""                             │
                    │    930 │   │   assert isinstance(message, str)                           │
                    │    931 │   │   if self.params.get('logger'):                             │
                    │ ❱  932 │   │   │   self.params['logger'].error(message)                  │
                    │    933 │   │   else:                                                     │
                    │    934 │   │   │   self._write_string(f'{self._bidi_workaround(message)} │
                    │        self._out_files.error, only_once=only_once)                       │
                    │    935                                                                   │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\spotdl\providers\audio\base.py:57 in error                             │
                    │                                                                          │
                    │    54 │   │   YTDL uses this to print errors.                            │
                    │    55 │   │   """                                                        │
                    │    56 │   │                                                              │
                    │ ❱  57 │   │   raise AudioProviderError(msg)                              │
                    │    58                                                                    │
                    │    59                                                                    │
                    │    60 ISRC_REGEX = re.compile(r"^[A-Z]{2}-?\w{3}-?\d{2}-?\d{5}$")        │
                    ╰──────────────────────────────────────────────────────────────────────────╯
                    AudioProviderError: ERROR: unable to download video data: HTTP Error 403:
                    Forbidden

                    The above exception was the direct cause of the following exception:

                    ╭─────────────────── Traceback (most recent call last) ────────────────────╮
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\spotdl\download\downloader.py:661 in search_and_download               │
                    │                                                                          │
                    │   658 │   │   │   │   display_progress_tracker.yt_dlp_progress_hook      │
                    │   659 │   │   │   )                                                      │
                    │   660 │   │   │                                                          │
                    │ ❱ 661 │   │   │   download_info = audio_downloader.get_download_metadata │
                    │   662 │   │   │   │   download_url, download=True                        │
                    │   663 │   │   │   )                                                      │
                    │   664                                                                    │
                    │                                                                          │
                    │ C:\Users\Fantaz\AppData\Local\Programs\Python\Python311\Lib\site-package │
                    │ s\spotdl\providers\audio\base.py:375 in get_download_metadata            │
                    │                                                                          │
                    │   372 │   │   │   │   return data                                        │
                    │   373 │   │   except Exception as exception:                             │
                    │   374 │   │   │   logger.debug(exception)                                │
                    │ ❱ 375 │   │   │   raise AudioProviderError(f"YT-DLP download error - {ur │
                    │   376 │   │                                                              │
                    │   377 │   │   raise AudioProviderError(f"No metadata found for the provi │
                    │   378                                                                    │
                    ╰──────────────────────────────────────────────────────────────────────────╯
                    AudioProviderError: YT-DLP download error -
                    https://music.youtube.com/watch?v=IA7yHvUwrCU
[01:36:27] DEBUG    MainThread - Took 4 seconds   
mizanur-sajid commented 1 month ago

SSLError: HTTPSConnectionPool(host='music.youtube.com', port=443): Max retries exceeded with url: /youtubei/v1/search?alt=json (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))

Any fix on this? please!

try-serverless commented 1 week ago

try using yt-dlp there are some ip which are banned by youtube im my case i was using a vps whose ip was banned by youtube so i was unable so use yt-dlp