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

ERROR: YouTube said: Unable to extract video data #1136

Closed
vietnguyen07 opened this issue Dec 20, 2020 · 18 comments
Closed

ERROR: YouTube said: Unable to extract video data #1136

vietnguyen07 opened this issue Dec 20, 2020 · 18 comments

Comments

@vietnguyen07
Copy link

Issue / Suggestion

Hi all,
I have an issue with mpsyt:

  1. I created my own API key and already set it in mpsyt
  2. When I try to search or play result, I have this error message and cannot continue:
    Search results for babyshark [1/25>

ERROR: j8z7UjET1Is: YouTube said: Unable to extract video data
According to my search, it may has some relations to youtube-dl?
What can I do to overcome this?

Your Environment

  1. Im running ubuntu 20.04 on Rasp 4-8G
  2. mpsyt version:
    mpsyt version : 0.2.8
    notes : released 17 February 2018
    pafy version : 0.5.2 (youtube-dl backend)
    youtube-dl version : 2020.09.14
    Python version : 3.8.6 (default, Sep 25 2020, 09:36:53)
    [GCC 10.2.0]
    Processor : aarch64
    Machine type : aarch64
    Architecture : 64bit, ELF
    Platform : Linux-5.8.0-1010-raspi-aarch64-with-glibc2.32
    sys.stdout.enc : utf-8
    default enc : utf-8
    Config dir : /home/viet/.config/mps-youtube
    env:TERM : xterm-256color
    env:SHELL : /bin/bash
    env:LANG : en_US.UTF-8
@jegornagel
Copy link

Same here. I can't move anywhere after this error.

@darkhz
Copy link

darkhz commented Dec 25, 2020

You'll have to delete the cache file first, its usually located in
/home/<user>/.config/mps-youtube/cache_py_x.x.x

I've faced this problem multiple times before, deleting the cache always works.

@amacgregor
Copy link

I'm facing this as well delete the cache did nothing

@kieracarman
Copy link

I'm also having this issue, api_key set, deleted cache and still not working.

@samkellerhals
Copy link

samkellerhals commented Dec 30, 2020

I am also having the same issue, set new API key and deleted cache also not able to extract video data.

However here is a temporary workaround:

  • Search for songs you want to listen to using mpsyt by doing /song name
  • Copy youtube video URL to clipboard using x <song_number> (you need to have installed pyperclip)
  • In another terminal window play the music using mpv <youtube_url> --no-video

@windowswithoutborders
Copy link

+1 right here on this issue on macOS 11.1. Followed the instructions for deleting pycache and setting the new api and getting unable to extract video data. I just heard about this program too and it would be my preferred way of listening to music off youtube if only it would work :(.

@Ja-sonYun
Copy link

Ja-sonYun commented Jan 11, 2021

I fixed this issue with removing mps-youtube installed using brew and reinstall with pip.
I'm using MacOS 11.1.

@cloudytheconqueror
Copy link

I fixed the issue by uninstalling and reinstalling a newer version of youtube-dl.

I think simply upgrading it will work: pip install youtube-dl --upgrade

@jav-12
Copy link

jav-12 commented Jan 27, 2021

Same error here. @cloudytheconqueror do we need to install youtube-dl as well to work with mpsyt ?

@sfolje0
Copy link

sfolje0 commented Feb 22, 2021

Maybe related to ytdl-org/youtube-dl#26152?

@lillian-alicia
Copy link

I think i found a possible fix. I updated youtube-dl pip3 install youtube-dl --upgrade This seemed to fix it after reloading mps.

@sfolje0
Copy link

sfolje0 commented Feb 27, 2021

I think i found a possible fix. I updated youtube-dl pip3 install youtube-dl --upgrade This seemed to fix it after reloading mps.

Yes, so I suspect. While the fix already mentioned in previous comments.

@kilianso
Copy link

I'm still having this issue on MacOS 10.15.7

I tried to uninstall mps-youtube using brew and reinstalled it using pip3 install mps-youtube.
After that the terminal shows: mpsyt: command not found - so i tried to set the PATH variable and still no luck.

So i reinstalled it using brew again and whenever i search something i see the error:
Youtube said: Unable to extract video data.

I tried it with mpv and Mplayer, no difference and i set my own YT API Key.

Any idea?

@ir1979
Copy link

ir1979 commented May 21, 2021

Install youtube-dl using pip3 install youtube-dl and add it to your PATH. Check where is the package you are running.

@mastersaints888
Copy link

mastersaints888 commented Jul 11, 2021

Solved

  • uninstall youtube-dl
  • reinstall youtube-dl with command
    sudo snap install youtube-dl # version 2021.06.06+git7fb9564
  • enjoy

@mk8486
Copy link

mk8486 commented Oct 15, 2021

try to remove and then reinstall with wget and then upgrade with this commands

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

sudo -H pip install --upgrade youtube-dl

@shafi-sfdc
Copy link

Above suggestion from @mk8486 worked for me

@taichuai
Copy link

taichuai commented Sep 1, 2023

you can use yt-dlp replace youtube-dl, ex:
yt-dlp -f ‘bv[ext=mp4]+ba[ext=m4a]’ –embed-metadata –merge-output-format mp4 [https://youtu.be/sKrT6mBrosc](https://link.zhihu.com/?target=https%3A//youtu.be/sKrT6mBrosc)

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