ncdownloader icon indicating copy to clipboard operation
ncdownloader copied to clipboard

youtube download raises 403 via ncdownloader & works when run from CLI

Open bugsyb opened this issue 1 year ago • 5 comments

Running on latest :

  • yt-dlp (2023.07.06)
  • ncdownloader (1.0.20).

On some videos, trying to download YT link which works when run from CLI, raises failure via ncdownloader:

WARNING: [youtube] unable to extract initial player response; 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
WARNING: [youtube] unable to extract yt initial data; 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
ERROR:
[download] Got error: HTTP Error 403: Forbidden. Giving up after 10 retries
ERROR: fragment 1 not found, unable to continue
ERROR:
[download] Got error: HTTP Error 403: Forbidden. Giving up after 10 retries
ERROR: fragment 1 not found, unable to continue

Example link: https://www.youtube.com/watch?v=ywOJj7GmfsQ

bugsyb avatar Sep 20 '23 19:09 bugsyb

same for this link https://www.youtube.com/watch?v=H_V_ISMK368

kck1001 avatar Sep 26 '23 12:09 kck1001

@bugsyb @kck1001 If YT-DLP works from the command line but not in Nextcloud, you can try setting the Youtube-dl binary location in Nextcloud to the one you use on the command line and see if that works. If you don't know where that is try using the whereis command.

MinamiHasaki avatar Oct 20 '23 14:10 MinamiHasaki

After setting path manually - it worked. There is no other yt-dlp binary. Seems like ncdownloader doesn't check PATH and if yt-dlp is in /usr/local/bin/ it is not used showing weird 403 messages.

Is there a chance the user PATH variable would be checked to catch the /usr/local/bin based yt-dlp one?

bugsyb avatar Oct 22 '23 13:10 bugsyb

I had the same problem as solved it by specifying the path as /usr/local/bin/yt-dlp

I notice in the instructions it saves the file to youtube-dl. This did not work and resulted in the same error as above. Perhaps this is part of the issue? Just a hunch.

sudo apt install aria2
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/download/2022.05.18/yt-dlp 4 -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

encryptedapple avatar Oct 28 '23 10:10 encryptedapple

Is there a chance the user PATH variable would be checked to catch the /usr/local/bin based yt-dlp one?

I think NCDownloader is suppose to download the YT-DLP binary itself when you install the app and reference that one. Why it didn't do that, or did and didn't work? I have no idea. It could be what encryptedapple said.

MinamiHasaki avatar Oct 30 '23 14:10 MinamiHasaki