-
Notifications
You must be signed in to change notification settings - Fork 6
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
Downloading music from youtube just doesn't work for me recently, no matter what. #19
Comments
might just be youtube blocking your IP address: What i did was:
|
can you please post the URL? pip install --upgrade yt-dlp alternatively:
|
Updating yt-dlp didn't work and my URL is https://music.youtube.com/watch?v=T6_Bvdc_dFU. So I didn't understand the first reply at first and I digged into debuging myself, now I know it was right all along, here's what I know now: Like the first reply suggested you need to get your cookies files and the official yt-dlp documentations suggest using a browser extension for that. The cookies need to be exported from a fresh bowser session (within the past 30 minutes) and you need to get them every time you want to use the tool if they weren't exported in the past 30 minutes. And at the end I noticed that there is no config file in shiradl folder? It doesn't create at all for me maybe that's why it's not working because yt-dlp doesn't get the cookies through shira? When I downloaded the song using yt-dlp with --cookies cookies.txt it works, just not using shira :/ Idk if what I just wrote makes any sense and sorry if it doesn't :D |
it works with shira I think the command is: im not on my computer so when I am I'll confirm or just post it again |
i haven't tested the cookie option, that was implemented by the previous developer Glomatico, but it should work. |
Should be like that, if that doesn't work just use yt-dl. Working on a CLI application that should do what shira does |
$ python -m shiradl -c m_cookies.txt https://music.youtube.com/watch?v=T6_Bvdc_dFU During handling of the above exception, another exception occurred: Traceback (most recent call last): ://////// |
that's weird. didn't do that for me, how recent are your cookies? |
just now and yes I exported them using incognito :/ |
must be a issue with how the code handles the cookie file, that sucks. Can you use yt-dl w / metadata or not? Might publish my cli application that should work tbh |
using yt-dl work with metadata but it's not the same ://// It's WEBM and the meta is only the song cover :< |
sorry dawg out of luck then unfortunately, until shira is updated :(
…________________________________
From: Qerkuu ***@***.***>
Sent: Tuesday, February 11, 2025 9:16:06 PM
To: KraXen72/shira ***@***.***>
Cc: marriedtopython ***@***.***>; Comment ***@***.***>
Subject: Re: [KraXen72/shira] Downloading music from youtube just doesn't work for me recently, no matter what. (Issue #19)
using yt-dl work with metadata but it's not the same ://// It's WEBM and the meta is only the song cover :<
—
Reply to this email directly, view it on GitHub<#19 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAE3S57HBXN4JEEZJHYCI7T2PJSBNAVCNFSM6AAAAABWZGXLL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJSGA4DKMBYGQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
yeah, thanks for trying to help :D |
No problem :) |
i don't really know who exactly i'm supposed to fix this since it does not occur for everybody. if anybody can reproduce this, i'd appreicate any pointers as to why it might be happening or better yet, a pull request with a fix :) |
@marriedtopython if you're interested, since you said you're working on something similar to shira, just know that shira is open to contributions, so feel free to open feature requests / pull requests for features/functionality you're missing and i'll very likely merge them |
@KraXen72 I'm trying to download a publicly avalaible song under this link https://music.youtube.com/watch?v=T6_Bvdc_dFU |
Sure, I'll see. Don't mind helping |
@KraXen72 also I noticed that the %USERPROFILE%.shiradl\config.json file doesn't generate for me automatically, I just don't have it at all????, don't know if this changes anything |
Try use YouTube not yt music and see what happens? |
this is the error i'm getting (for anyone else who might need it) |
@KraXen72 I'm on a different PC that's almost clean, installed python, shiradl, About the error I got the exact same trying to download this song from youtube music, so like @marriedtopython suggested I downloaded the song but using youtube (https://youtu.be/K57dVZ4oHtQ?feature=shared) and it works!!! So it's something with youtube music :// |
Mighr just be yt music becwuse yt music and YouTube have different apis
…________________________________
From: KraXen72 ***@***.***>
Sent: Wednesday, February 12, 2025 8:45:53 AM
To: KraXen72/shira ***@***.***>
Cc: marriedtopython ***@***.***>; Mention ***@***.***>
Subject: Re: [KraXen72/shira] Downloading music from youtube just doesn't work for me recently, no matter what. (Issue #19)
@Qerkuu<https://github.com/Qerkuu>
1. a config file not being generated is silghtly concerning but it doesen't matter since there are defaults in the program so it works anyway
2. i tried your link and i'm getting an error as well, but i think it's a different one. anyway, i'll investigate it, just can't promise when.
yt_dlp.utils.ExtractorError: [youtube:tab] None: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/media/win/coding/python/shira/shiradl/cli.py", line 161, in cli
tags = dl.get_tags(ytmusic_watch_playlist, track)
File "/media/win/coding/python/shira/shiradl/dl.py", line 126, in get_tags
return self.__collect_tags(ytmusic_watch_playlist, track)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/win/coding/python/shira/shiradl/dl.py", line 152, in __collect_tags
for i, video in enumerate(self.get_ydl_extract_info(f'https://www.youtube.com/playlist?list={str(ytmusic_album["audioPlaylistId"])}')["entries"]):
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/media/win/coding/python/shira/shiradl/dl.py", line 60, in get_ydl_extract_info
info = ydl.extract_info(url, download=False)
File "/home/nex/.local/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1626, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nex/.local/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1655, in wrapper
self.report_error(str(e), e.format_traceback())
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nex/.local/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1095, in report_error
self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nex/.local/lib/python3.13/site-packages/yt_dlp/YoutubeDL.py", line 1034, in trouble
raise DownloadError(message, exc_info)
yt_dlp.utils.DownloadError: ERROR: [youtube:tab] None: Unable to download API page: HTTP Error 400: Bad Request (caused by <HTTPError 400: Bad Request>)
[INFO 09:42:39] Done (1 error(s))
this is the error i'm getting (for anyone else who might need it)
—
Reply to this email directly, view it on GitHub<#19 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BAE3S56Y4QNQHMURFAUXRJD2PMC4DAVCNFSM6AAAAABWZGXLL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNJTGAYTINBXGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
i'll add dateutil to requirement.txt |
I can test when I get home but that wouldn't be dor like the next 4/5 hours or so |
likely won't be today, but we'll see. i'll mention you when it's added |
Cool, I'll try to help with the downloading thing with my fork of shira |
Started happening to me as well a couple of days ago. It broke gytmdl as well. |
could be how yt-dlp tries to structure YTMUSIC playlists, I investiaged the error and it seems like yt-dlp is asking for a specific format, (could be due to a api error) and if one isnt specified then it just bugs out. |
Back on my PC and downloading using youtube doesn't work too 😭 $ python -m shiradl https://youtu.be/T6_Bvdc_dFU?si=8x1_pUGrUrrsSGJ4 |
Is there any more errors or is it just like that? btw does it ask about formats? |
don't see anything about formats, this is the whole error messeage: $ python -m shiradl https://youtu.be/T6_Bvdc_dFU?si=8x1_pUGrUrrsSGJ4 During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Also this is the error messeage I get when trying to use the program with cookies: $ python -m shiradl -c cukies.txt https://youtu.be/T6_Bvdc_dFU?si=8x1_pUGrUrrsSGJ4 During handling of the above exception, another exception occurred: Traceback (most recent call last): |
one error i keep seeing is this: can you confirm that your playlist is privated / unlisted? if it is, try publicising it and try again? |
The link is in my messeage, not a playlist nor a private video, public song. https://youtu.be/T6_Bvdc_dFU?si=8x1_pUGrUrrsSGJ4 |
So I'm back on the clean PC that worked yesterday
I tried to download a txt file of link all from youtube, not youtube music and some of them work some of them don't, maybe they are on youtube but somehow using youtube music? [INFO 08:45:17] Downloading "Jamiroquai - Virtual Insanity (Official Video)" (track 1/1 from URL 12/23) During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
For example this works: https://youtu.be/TCd6PfxOy0Y?feature=shared And this doesn't (I think those songs are from youtube music): https://www.youtube.com/watch?v=EbjbmvK-BvM |
I guess one way for it to work is just to find the song you want to download not created by youtube music but uploaded to youtube as a full video, for example this: https://www.youtube.com/watch?v=K57dVZ4oHtQ - works https://www.youtube.com/watch?v=T6_Bvdc_dFU - doesn't work I guess I didnt discover anything that we didn't know yet but this is some kind of a solution for now for anyone having this problem. |
That shouldn't be a problem though, because YouTube and yt music are still google but under 2 different branches (if you get what i mean) so it should still work regardless of it is on yt, i think the issue is that on dl.py it way it tries to handle links, something broke or a yt-dl update broke it. But with some trial and error i think i almost got it working. |
Yeah I reckon it should work but it doesn't so.. yeah :d |
when i get home today, I'll test what I've done and if it works I'll pull request it, and also post it here |
I came here because I was having the exact same starting issue. I can corroborate @Qerkuu 's claim on how videos generated by YouTube are the problem. I was able to download a regular video from YouTube using the tool, but a video I tried that was auto-generated-- it had the "[name] - Topic" channel name-- didn't work with the tool and gave the same error. I don't know if this is helpful, but I thought it would be worth noting. I would love to see this fixed! |
I totally forgot about fixing this tbh, i will try but that is like at the bottom of my todo list, so dont expect it being fixed in the next week or 2 sorry if this is the reply you expected :( |
@marriedtopython don't need to be sorry :D Take your time and don't worry |
Thank you, yeah i have been really busy and feeling too tired to help issues on github so, dont worry will fix whenever i have a chance |
That's okay. It's not life changing. I can wait. |
To add a little, here's my error code when I try to download a video's "[name] - Topic" audio [INFO 20:52:30] Downloading "PLACE" (track 1/1 from URL 1/1) During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): I should have an updated yt-dlp, and I installed ffmpeg and added to path manually. I had a bit of a conversation with Chappy (ChatGPT) and all the requirements should have been installed and updated. To reiterate one more time, the tool works fine with videos that aren't generated by YouTube (at least with the "[name] - Topic" origin). I've tried on YouTube Music and with copying the share link, and there has been no difference in the result. Perhaps being able to handle metadata that isn't received properly by the tool would fix it? |
The changes made in this PR fix the issue (http 400 errors): sigma67/ytmusicapi#744 For now, I got a working version installed by using pipx:
It would probably make sense to close this issue when a new |
hi thegu!l proper pipx support is planned for the future, i just haven't gotten to it yet. |
@thegu5 bless you 🙏 |
$ ERROR: unable to download video data: HTTP Error 403: Forbidden
[ERROR 22:04:04] Failed to download "Shine a Light (Flight Facilities Remix)"
(track 1/1 from URL 1/1)
[ERROR 22:04:04]
Traceback (most recent call last):
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3489, in process_info
success, real_download = self.dl(temp_filename, info_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3209, in dl
return fd.download(name, new_info, subtitle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\downloader\common.py", line 464, in download
ret = self.real_download(filename, info_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\downloader\http.py", line 367, in real_download
establish_connection()
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\downloader\http.py", line 118, in establish_connection
ctx.data = self.ydl.urlopen(request)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 4172, in urlopen
return self._request_director.send(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\networking\common.py", line 117, in send
response = handler.send(request)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\networking_helper.py", line 208, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\networking\common.py", line 340, in send
return self._send(request)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\networking_requests.py", line 365, 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\shira\shiradl\cli.py", line 178, in cli
dl.download(track["id"], temp_location)
File "C:\Users\shira\shiradl\dl.py", line 221, in download
ydl.download("music.youtube.com/watch?v=" + video_id)
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3615, in download
self.__download_wrapper(self.extract_info)(
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3588, in wrapper
res = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1623, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extr
a_info, process)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1634, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1790, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1869, in process_ie_result
return self.extract_info(
^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1623, in extract_info
return self.__extract_info(url, self.get_info_extractor(key), download, extr
a_info, process)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1634, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1790, in __extract_info
return self.process_ie_result(ie_result, download, extra_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1849, in process_ie_result
ie_result = self.process_video_result(ie_result, download=download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3021, in process_video_result
self.process_info(new_info)
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 177, in wrapper
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 3498, in process_info
self.report_error(f'unable to download video data: {err}')
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1092, in report_error
self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *
args, **kwargs)
File "C:\Users\AppData\Local\Programs\Python\Python312\Lib\site-packages
\yt_dlp\YoutubeDL.py", line 1031, in trouble
raise DownloadError(message, exc_info)
yt_dlp.utils.DownloadError: ERROR: unable to download video data: HTTP Error 403
: Forbidden
The text was updated successfully, but these errors were encountered: