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

[BUG?] "Unable to extract video data" with fresh install/cookies.txt file #26936

Open
tmeitner opened this issue Oct 19, 2020 · 6 comments
Open

[BUG?] "Unable to extract video data" with fresh install/cookies.txt file #26936

tmeitner opened this issue Oct 19, 2020 · 6 comments

Comments

@tmeitner
Copy link

@tmeitner tmeitner commented Oct 19, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.09.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

mediaserver@mediaserver:~$ youtube-dl --ignore-config --cookies '/mnt/Storage 4/YouTube/cookies.txt' --verbose https://www.youtube.com/watch?v=SBbYlhvV6GY
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ignore-config', u'--cookies', u'/mnt/Storage 4/YouTube/cookies.txt', u'--verbose', u'https://www.youtube.com/watch?v=SBbYlhvV6GY']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 2.7.18 (CPython) - Linux-5.4.0-51-generic-x86_64-with-Ubuntu-20.04-focal
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] SBbYlhvV6GY: Downloading webpage
ERROR: SBbYlhvV6GY: YouTube said: Unable to extract video data
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 532, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1910, in _real_extract
'YouTube said: %s' % unavailable_message, expected=True, video_id=video_id)
ExtractorError: SBbYlhvV6GY: YouTube said: Unable to extract video data

Description

Had to rebuild my home server and set up my YT-DL cron jobs again, noticed they weren't running. Tried running my scripts, was getting "Unable to extract video data" on them. Using latest version. I used the Firefox plugin to grab a fresh cookies file, in case that was the problem. Still the same error.

I'm now running Ubuntu 20.04. I did install ffmpeg per the Reddit auto-bot's suggestion. Same behavior. I attempted to run it with python3.8 and I still get the "unable to extract video data" error.

@october262
Copy link

@october262 october262 commented Oct 19, 2020

first try running sudo apt update and sudo apt upgrade
to update and upgrade your packages. then try downloading your youtube videos.
does it happen on more than one video ?? this link in your log works ok for me - https://www.youtube.com/watch?v=SBbYlhvV6GY

@tmeitner
Copy link
Author

@tmeitner tmeitner commented Oct 19, 2020

first try running sudo apt update and sudo apt upgrade
to update and upgrade your packages. then try downloading your youtube videos.
does it happen on more than one video ?? this link in your log works ok for me - https://www.youtube.com/watch?v=SBbYlhvV6GY

Thanks for the reply. All packages are updated and upgraded, problem persists.

It happens on all videos from YouTube, not just that one. They all produce the same error. I run a few different scripts with batch commands on them. Here is one, and the YouTube download attempts all throw the same error and don't download:

#!/bin/bash cd '/mnt/Storage 4/Podcasts'; python3.8 /usr/local/bin/youtube-dl --cookies '/mnt/Storage 4/YouTube/cookies.txt' --ignore-config -x --audio-format mp3 --ignore-errors --dateafter now-2weeks --playlist-end 10 --download-archive "/mnt/Storage 4/Podcasts/downloaded.txt" -i -o "%(uploader)s/%(playlist)s/%(title)s.%(ext)s" --add-metadata --batch-file "/mnt/Storage 4/Podcasts/podcasts.txt"

This didn't happen on my previous server, which ran Ubuntu 16.04, I believe (maybe 18.04). Nothing different in the configurations, exact same YTDL commands, but this error keeps coming.

@october262
Copy link

@october262 october262 commented Oct 19, 2020

try running youtube-dl --force-generic-extractor https://www.youtube.com/watch?v=SBbYlhvV6GY
and see if the video will download.

@tmeitner
Copy link
Author

@tmeitner tmeitner commented Oct 20, 2020

So, it's... working now, I guess?

The --force-generic-extractor command just kicked out an "invalid URL" error on every YouTube link I tried. When I pulled that out and just ran the default youtube-dl command, it worked fine. And then I re-ran my scripts manually, and it appears as though at some point this afternoon, it started working.

The embedding of the thumbnails isn't quite working that reliably, but it looks like my videos are getting downloaded now, even though I've done nothing different. I guess I'll close this one out. Thanks for helping! Weird.

@tmeitner tmeitner closed this Oct 20, 2020
@yhtojy
Copy link

@yhtojy yhtojy commented Oct 20, 2020

#26909 more info for this same issue, if we need it one day.

@tmeitner
Copy link
Author

@tmeitner tmeitner commented Oct 22, 2020

Well, back to this error again. Noticed my cron jobs weren't running and here we are. I tried the force-generic-extractor command and every video download just kicks an "Unsupported URL" error.

Here's the full command I'm running. I've been running this for months with zero issues until this new installation. The only thing in the batch file is a list of YouTube URLs.:

/usr/local/bin/youtube-dl --cookies '/mnt/Storage 4/YouTube/cookies.txt' --ignore-config -f best --playlist-reverse --ignore-errors --download-archive "/mnt/Storage 4/YouTube/downloaded.txt" -i -o "%(uploader)s/%(playlist)s/%(uploader)s - S01E%(playlist_index)s - %(title)s.%(ext)s" --add-metadata --write-thumbnail --batch-file="/mnt/Storage 4/YouTube/channel_list.txt"

@tmeitner tmeitner reopened this Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.