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

Spotify podcast download support #9786

Closed
11 tasks done
joonas-foo opened this issue Apr 25, 2024 · 1 comment
Closed
11 tasks done

Spotify podcast download support #9786

joonas-foo opened this issue Apr 25, 2024 · 1 comment
Labels
DRM The referred content is DRM protected duplicate This issue or pull request already exists site-bug Issue with a specific website

Comments

@joonas-foo
Copy link

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

No response

Provide a description that is worded well enough to be understood

Hi! Would you add support for downloading Spotify podcasts? Like this podcast:

https://open.spotify.com/episode/3zqQZaet8MKdbeXF9Z9guF

I found a messy tool for Linux, possibly Spotdl, but it didn't do the task either.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

joonas@joonas-MS-7D95:~$ yt-dlp -vU https://open.spotify.com/episode/3zqQZaet8MKdbeXF9Z9guF
[debug] Command-line config: ['-vU', 'https://open.spotify.com/episode/3zqQZaet8MKdbeXF9Z9guF']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds [ff38a011d] (pip)
[debug] Python 3.11.6 (CPython x86_64 64bit) - Linux-6.5.0-21-generic-x86_64-with-glibc2.38 (OpenSSL 3.0.10 1 Aug 2023, glibc 2.38)
[debug] exe versions: ffmpeg 6.0 (setts), ffprobe 6.0, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.47.0, requests-2.31.0, secretstorage-3.3.3, sqlite3-3.42.0, urllib3-2.2.1, websockets-12.0, xattr-0.10.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.04.21.232710 from yt-dlp/yt-dlp-nightly-builds)
WARNING: The program functionality for this site has been marked as broken, and will probably not work.
[spotify] Downloading JSON metadata
[spotify] Extracting URL: https://open.spotify.com/episode/3zqQZaet8MKdbeXF9Z9guF
[spotify] 3zqQZaet8MKdbeXF9Z9guF: Downloading JSON metadata
ERROR: [spotify] 3zqQZaet8MKdbeXF9Z9guF: Unable to download JSON metadata: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 734, in extract
    ie_result = self._real_extract(url)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/spotify.py", line 126, in _real_extract
    episode = self._call_api('Episode', episode_id, {
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/spotify.py", line 34, in _call_api
    return self._download_json(
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1127, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 1087, in download_handle
    res = self._download_webpage_handle(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 954, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 903, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/extractor/common.py", line 890, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query, extensions))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4131, in urlopen
    return self._request_director.send(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/networking/common.py", line 115, in send
    response = handler.send(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/networking/_helper.py", line 208, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/networking/common.py", line 335, in send
    return self._send(request)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/joonas/.local/lib/python3.11/site-packages/yt_dlp/networking/_requests.py", line 350, in _send
    raise HTTPError(res, redirect_loop=max_redirects_exceeded)
yt_dlp.networking.exceptions.HTTPError: HTTP Error 400: Bad Request
@joonas-foo joonas-foo added site-bug Issue with a specific website triage Untriaged issue labels Apr 25, 2024
@fireattack
Copy link
Contributor

I don't think currently yt-dlp supports Spotify at all since all the audio files are now encrypted (DRM'd), including podcasts.

It was well discussed at #943.

If by spotDL you mean https://github.com/spotDL/spotify-downloader , it was done by matching the song with YouTube and download from there, which has no DRM.

@bashonly bashonly added DRM The referred content is DRM protected duplicate This issue or pull request already exists and removed triage Untriaged issue labels Apr 29, 2024
@bashonly bashonly closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DRM The referred content is DRM protected duplicate This issue or pull request already exists site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

3 participants