bbolli / tumblr-utils

Utilities for dealing with Tumblr blogs, Tumblr backup
GNU General Public License v3.0
668 stars 124 forks source link

properly installing youtube_dl #173

Closed aldunbar closed 5 years ago

aldunbar commented 5 years ago

I installed youtube_dl using homebrew (says 2018.12.09 is installed and up-to-date), but when I run --save-video, I get the message: tumblr_backup.py: error: --save-video: module 'youtube_dl' is not installed What am I doing wrong?

cebtenzzre commented 5 years ago

Did you install the youtube_dl python module, or did you install the youtube-dl (with a hyphen) executable?

aldunbar commented 5 years ago

It looks like the latter: https://rg3.github.io/youtube-dl/ which I got to from: https://github.com/bbolli/tumblr-utils/blob/master/tumblr_backup.md

Hrxn commented 5 years ago

pip2 install --upgrade youtube-dl

aldunbar commented 5 years ago

Despite having 2.7.10, I'm getting -bash: pip: command not found (and pip2 : command not found). I can run --save-video-tumblr and get videos (and a lot of 403 forbiddens), but still no luck on --save-video. I'll keep on muddling my way through. Thanks.

aldunbar commented 5 years ago

Closer... Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/youtube_dl' Consider using the --user option or check the permissions.

Hrxn commented 5 years ago

Well, change permissions manually if necessary.. Or try this: pip2 install --upgrade --user youtube-dl

Hrxn commented 5 years ago

BTW

I can run --save-video-tumblr and get videos (and a lot of 403 forbiddens), but still no luck on --save-video.

This is expected behaviour. --save-video-tumblr downloads videos hosted on Tumblr itself. They don't need any special processing or extraction, just normal HTTP download. Hence no youtube-dl required for those videos.

And the 403 errors happens because of the Tumblr video purge. You can check it for yourself. Visit some popular, video heavy blog on Tumblr (NSFW or not, both were purged, but NSFW probably more) in your browser, head to the archive view (...,tumblr.com/archive) and filter by type video. A lot of videos are displayed as black preview, and if you open the post, nothing plays. Opening the video link directly in the browser will show the Tumblr 403 error message,

moonlit commented 5 years ago

pip may need to be run from within Python to install packages for use by python2 instead of Python 3 on macOS if both are installed. At least on our system Python 3 is using pip3 but Python 2 does not seem to provide the corresponding pip or pip2.

sudo -H python2 -m pip install youtube_dl worked for us!

cebtenzzre commented 5 years ago

Dupe of #89