ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.01k stars 10.01k forks source link

GFYCat to GifDeliveryNetwork Fix ? #26631

Closed Anon1337Elite closed 3 years ago

Anon1337Elite commented 4 years ago

Checklist

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '-a', 'List.txt']
[debug] Batch file urls: ['https://www.reddit.com/r/NSFW_GIF/comments/f7ifa0/that_jiggle_with_every_pump/']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.09.14
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg git-2020-05-04-5767a2e, ffprobe git-2020-05-04-5767a2e
[debug] Proxy map: {}
[RedditR] f7ifa0: Downloading JSON metadata
[Gfycat] firmexcitablehorsechestnutleafminer: Downloading video info
ERROR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\extractor\common.py", line 627, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp1sp1mtlp\build\youtube_dl\YoutubeDL.py", line 2238, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default

Description

Since the move from GFYCAT to Redgifs, some links now redirect to https://www.gifdeliverynetwork.com/ , Which makes the program to fail and not work anymore with that link because it redirects the GFYCat Link to gifdeliverynetwork.

TheRealDude2 commented 4 years ago

For the above link I was able to customize the extractor so that it works. Then I tried a few different gfycat links from reddit. It seems to me, that at the moment only the links that are not recognized by the gfycat extractor, but redirected to the generic extractor, are working. I rewrote the _valid_url in a test version of the extractor, that it doesn't recognize links anymore and uses the gerneric extractor instead. This seems to work so far. If this is the case for all links, it might be best to remove the gfycat extractor completely.

Anon1337Elite commented 4 years ago

For the above link I was able to customize the extractor so that it works. Then I tried a few different gfycat links from reddit. It seems to me, that at the moment only the links that are not recognized by the gfycat extractor, but redirected to the generic extractor, are working. I rewrote the _valid_url in a test version of the extractor, that it doesn't recognize links anymore and uses the gerneric extractor instead. This seems to work so far. If this is the case for all links, it might be best to remove the gfycat extractor completely.

That is awesome if it works. Mind sharing a test version of it working. Would be really nice. This is also only for links that redirect from gfycat to gifdeliverynetwork. The gfycat links that open in gfycat are fine.

TheRealDude2 commented 4 years ago

Can you send me a link gfycat/gfycat link that works for you?

If I have a useful trial version that works with the link above, but keeps the old function, I will post the changes. Not everything works as it should yet.

Anon1337Elite commented 3 years ago

It's been 8 Months, it seems this is still not working on the latest version. Any updates on this ?

https://github.com/ytdl-org/youtube-dl/issues/27543