Skip to content

HTTP error 400 #242

@abdci

Description

@abdci

i just tried to download music videos, and it always reports this

[INFO     00:27:18] [URL 1/1] Processing "https://music.apple.com/us/music-video/berghain/1848939249"
? Select which video codec to download: (Codec | Resolution | Bitrate) hvc1 | 3578x2160 | 29598123
? Select which audio codec to download: audio-stereo-256
[ERROR    00:27:32] [URL 1/1] Error processing "https://music.apple.com/us/music-video/berghain/1848939249"
Traceback (most recent call last):
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\cli\cli.py", line 514, in main
    download_queue = await downloader.get_download_queue(url_info)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader.py", line 242, in get_download_queue
    return await self._get_download_queue(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader.py", line 321, in _get_download_queue
    await self.get_single_download_item(music_video_response["data"][0])
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader.py", line 58, in get_single_download_item
    download_item = await self.music_video_downloader.get_download_item(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader_music_video.py", line 216, in get_download_item
    cover_file_extension = await self.downloader.get_cover_file_extension(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader_base.py", line 129, in get_cover_file_extension
    cover_bytes = await self.get_cover_bytes(cover_url)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\async_lru\__init__.py", line 288, in __call__
    return await self.__wrapper(self.__instance, *fn_args, **fn_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\async_lru\__init__.py", line 221, in __call__
    return await asyncio.shield(fut)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\downloader\downloader_base.py", line 176, in get_cover_bytes
    raise_for_status(response, {200, 404})
  File "C:\Users\yomie\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\gamdl\utils.py", line 11, in raise_for_status
    raise httpx._exceptions.HTTPError(
httpx.HTTPError: HTTP error 400: {"code":{"code":2,"name":"Bad Request"},"errorMessage":"Invalid token","correlationKey":"JOQSBJKC45BOAQMNJCOUO55XI4"}
[INFO     00:27:32] Finished with 1 error(s)

my config

log_level = INFO
no_exceptions = false
cookies_path = cookies.txt
language = en-US
output_path = Apple Music
temp_path = .
wvd_path = null
overwrite = false
save_cover = false
save_playlist = false
no_synced_lyrics = false
synced_lyrics_only = false
nm3u8dlre_path = N_m3u8DL-RE
mp4decrypt_path = mp4decrypt
ffmpeg_path = ffmpeg
mp4box_path = MP4Box
download_mode = nm3u8dlre
remux_mode = ffmpeg
cover_format = raw
exclude_tags = null
cover_size = 1200
truncate = null
codec_song = aac-legacy
synced_lyrics_format = lrc
log_file = null
album_folder_template = {album_artist}/{album}
compilation_folder_template = Compilations/{album}
no_album_folder_template = {artist}/Unknown Album
no_album_file_template = {title}
playlist_file_template = Playlists/{playlist_artist}/{playlist_title}
date_tag_template = %Y-%m-%dT%H:%M:%SZ
music_video_codec_priority = ask
music_video_remux_format = mp4
music_video_resolution = 2160p
uploaded_video_quality = best
single_disc_file_template = {track:02d} {title}
multi_disc_file_template = {disc}-{track:02d} {title}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions