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

gallery-dl calling youtube-dl for jpgs and pngs? #733

Closed
KirbyFan102 opened this issue May 6, 2020 · 9 comments
Closed

gallery-dl calling youtube-dl for jpgs and pngs? #733

KirbyFan102 opened this issue May 6, 2020 · 9 comments

Comments

@KirbyFan102
Copy link

This happened when I was trying to extract from a twitter page with videos. I tried to make it use youtube-dl exclusively for video extraction, and not only does it still save them as None.mp4, it started giving out this error after the second video: ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>);

What's even weirder is that it then began doing the same thing for some IMAGE files, and calling youtube-dl to download them. I don't know what's causing this, as I have the latest version of youtube-dl.

Also, I tried changing the youtube-dl filename in the 'outtmpl' option, but it did nothing.

@iamleot
Copy link
Contributor

iamleot commented May 6, 2020 via email

@KirbyFan102
Copy link
Author

https://twitter.com/CaptainPiika
Remember to alter your configuration to make youtube-dl download the video files.

@iamleot
Copy link
Contributor

iamleot commented May 6, 2020 via email

@KirbyFan102
Copy link
Author

It also didn't have any problems on my end. Try altering your config file to make gallery-dl save files as {filename}.{extension}.

@mikf
Copy link
Owner

mikf commented May 14, 2020

Try altering your config file to make gallery-dl save files as {filename}.{extension}.

That works as well.

I'm guessing you are trying to get youtube-dl to do the data extraction (videos": "ytdl") while logged in. That doesn't work on youtube-dl's side. Try setting downloader.ytdl.forward-cookies to false.

@KirbyFan102
Copy link
Author

No, it made no difference. Whether it was true or false, it kept trying to download .jpg files with ytdl, and it still gave the same error message.

@KirbyFan102
Copy link
Author

I just wanted to have the downloaded videos from youtube get their proper names instead of None.mp4. That's all I wanted. I don't even really want to use youtube-dl to download all videos, just the ones that are from youtube.

@mikf
Copy link
Owner

mikf commented May 18, 2020

I've figured out what went wrong here. It was using an old filename when reporting an error during a youtube-dl download, which made you think it used youtube-dl for images.

$ gallery-dl -u USERNAME -o videos=ytdl -o forward-cookies=true https://twitter.com/CaptainPiika
...
/tmp/twitter/CaptainPiika/1259985338606518273_1.jpg
/tmp/twitter/CaptainPiika/1259985338606518273_2.jpg
[downloader.ytdl][error] ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden ...
[download][error] Failed to download 1259985338606518273_2.jpg
/tmp/twitter/CaptainPiika/1258869613284163585_1.jpg
...

Notice how the filename in the error message is the same as the filename from the last successful download (1259985338606518273_2.jpg) This problem has now been fixed in abbd8fb.

Regarding downloading Twitter videos: When setting downloader.ytdl.forward-cookies to false, did you set it to the boolean false, or the string "false"? Because the latter gets considered as "true" (a non-empty string). Try this again and set it like

"forward-cookies": false

this time and not

"forward-cookies": "false"

You can also set this value through a command-line switch, by the way. Try

$ gallery-dl -o forward-cookies= https://twitter.com/CaptainPiika

@KirbyFan102
Copy link
Author

Okay. Now it's giving me this error message:

[twitter][warning] Unable to fetch video data for 1259597387422564353 ('401 Authorization Required')

This result was achieved via changing the value in the config file, as the command you gave didn't work. I think it may only work in Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants