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

Fix inside: youtube-dl not working on after some time (or on older release) #442

Closed
gizmo21 opened this issue Jan 13, 2019 · 3 comments
Closed

Comments

@gizmo21
Copy link
Contributor

gizmo21 commented Jan 13, 2019

I'm still on v.1.0.0 (of course classic ;) ) with my box as this is the most stable/fast version for me and nearly has all the features I need. But youtube downloads failed some weeks ago and I now had time to check and a simple sudo apt-get upgrade didn't do the job as youtube-dl came not as apt package but as python pip. I guess especially the youtube-dl service needs some regular updating as yt will change it's site/protocol from time to time, so even on the lastest release-version this could happen if there is no new version is out for some weeks.

My problematic version was:
Found existing installation: youtube-dl 2018.9.8
Which did not display any errors, but just did not download anything to the folder.
Manually check the error by using:
youtube-dl -f bestaudio --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=7GI0VdPehQI

Error: RegexNotFoundError: Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Was fixed with:
Successfully installed youtube-dl-2019.1.10

I would paste the following into the wiki-FAQs if it is OK:


Fix broken youtube-dl while staying on same RPi-Jukebox-RFID releaseversion

Youtube download could fail after some time (due to site/protocol... changes). There could be no error displayed in webfrontend and the log also does not show an error. To check if the service has a problem just manually run:
youtube-dl -f bestaudio --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=7GI0VdPehQI
If it says update youtube-dl and if you don't want a full phoniebox reinstall or a regular RPi-Jukebox-RFID update to the newest releaseversion here is the way to update youtube-dl only:
sudo pip install --upgrade youtube_dl
This will only upgrade this service and will leave the rest of your install untouched.


@gizmo21
Copy link
Contributor Author

gizmo21 commented Jan 14, 2019

@MiczFlor
Copy link
Owner

Hi @gizmo21
Here comes my positive answer: I had the same issue, solved it like you and failed to add it to the wiki :) thanks for the contribution!

Sent with GitHawk

@gizmo21
Copy link
Contributor Author

gizmo21 commented Jan 18, 2019

Had a problem again with a video and updated to 2019-01-17.
And just to document that here, one video was working but another one not.

I wrote a script to do this update from webfrontend. For everyone that use these scripts: http:///userScripts.php:

/home/pi/RPi-Jukebox-RFID/script/userscripts/updateyoutube-dl.sh (Filerights:755)

#!/bin/bash

# From time to time youtube changes it's page/protcols and youtube-dl does not work anymore
# This script just updates the python pip package 'youtube_dl'
# no options in this script
echo '-------updateyoutube-dl.sh -------' >> /home/pi/RPi-Jukebox-RFID/scripts/userscripts/userscript.log
sudo pip install --upgrade youtube_dl >> /home/pi/RPi-Jukebox-RFID/scripts/userscripts/userscript.log

@gizmo21 gizmo21 closed this as completed Jan 18, 2019
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

2 participants