ybd-project / ytdl-core

Fast and secure YouTube downloader for JavaScript and TypeScript
MIT License
22 stars 3 forks source link

Problem with successful retrieval of information but download fails with 403 #21

Open ybd-project opened 4 days ago

ybd-project commented 4 days ago

Describe the bug

Retrieving video information from YouTube is successful, but downloading fails with status code 403.

Error Details (Log)

Please refer to https://github.com/ybd-project/ytdl-core/discussions/13#discussioncomment-10594751

image

Environment

VenomSA commented 3 days ago

Happens to me too, getting 403 since yesterday.

ybd-project commented 3 days ago

Maybe the following methods may be useful.

  1. set the UserAgent to the request. (Currently no explicitly valid value is set.)
  2. Add a pot parameter to the URL. I heard somewhere that you can add a PoToken to the pot parameter.

If these are valid, they will be implemented in a new version.

nikitafloy commented 2 days ago

Maybe the following methods may be useful.

  1. set the UserAgent to the request. (Currently no explicitly valid value is set.)
  2. Add a pot parameter to the URL. I heard somewhere that you can add a PoToken to the pot parameter.

If these are valid, they will be implemented in a new version.

tried, still not working

ybd-project commented 2 days ago

I really don't know under what circumstances the 403 is occurring...

Also, does the 403 occur on all client URLs? So far we have confirmed the occurrence with the web client and WebCreator

nikitafloy commented 2 days ago

I really don't know under what circumstances the 403 is occurring...

Also, does the 403 occur on all client URLs? So far we have confirmed the occurrence with the web client and WebCreator

ios working good, other is not

ybd-project commented 2 days ago

I really don't know under what circumstances the 403 is occurring...

Also, does the 403 occur on all client URLs? So far we have confirmed the occurrence with the web client and WebCreator

ios working good, other is not

Thanks for the valuable information, I will update to select iOS client for 403 errors.

ybd-project commented 2 days ago

Version v5.1.6, which addresses this issue, is now available. Please try it to see if it is fixed.

VenomSA commented 2 days ago

Version v5.1.6, which addresses this issue, is now available. Please try it to see if it is fixed.

Still not working..

[ DEBUG ]: [ web ]: The URL for the video did not return a successful response. Got another format. Reason: Status code: 403 [ DEBUG ]: [ ios ]: The URL for the video did not return a successful response. Got another format. Reason: Status code: 403 [ DEBUG ]: [ android ]: The URL for the video did not return a successful response. Got another format. Reason: Status code: 403 Error: No such format found: highest

ybd-project commented 2 days ago

If you get this far, it is most likely an IP restriction. If there is no reason, try specifying the option filter: "audioandvideo". videos with an itag of 18 may work.

ybd-project commented 2 days ago

Also, does the problem occur at all URLs?

nikitafloy commented 2 days ago

@VenomSA and check your DNS and firewall settings.

I used to have no problem connecting to sources and getting information through node.js, but I spent 2 days to solve the problem with accessing google.

This problem is not solved in any of the ytdl packages and forks.

VenomSA commented 1 day ago

If you get this far, it is most likely an IP restriction. If there is no reason, try specifying the option filter: "audioandvideo". videos with an itag of 18 may work.

I have like 20 proxies, how could that happen so sudden? I managed to get this working well when we last talked - in the issue i opened couple days ago and then it stopped suddenly.

I also tried with "audioandvideo" and it doesn't want to work.

VenomSA commented 1 day ago

@VenomSA and check your DNS and firewall settings.

I used to have no problem connecting to sources and getting information through node.js, but I spent 2 days to solve the problem with accessing google.

This problem is not solved in any of the ytdl packages and forks.

What do you mean accessing google? Im trying to access an youtube video (audio only)

MOXHARTZ commented 1 day ago

Hi, the 403 error is not related to ytdl. It shows that we are directly banned by youtube.

When I try to watch videos from directly youtube (with web browser), google server does not return the 200 response. I can search, fetch informations but i can't get the video source from google servers. So I am blacklisted. Probably it's the same for other people who have this problem.

Maybe youtube's ban can be bypassable with oauth. I will update here if I try with a new ip