An open API service indexing awesome lists of open source software.

https://github.com/ern0/youda

💾 Youtube Download Automation
https://github.com/ern0/youda

automation utility youtube

Last synced: about 1 month ago
JSON representation

💾 Youtube Download Automation

Awesome Lists containing this project

README

          

youda.py
========
*Youtube Downloader Automation*

## How to setup ##
- download this script to your computer
- install youtube-dl

on a Mac: brew install youtube-dl

on any OS: sudo pip install --upgrade youtube_dl
- install a context-menu extension in your browser

e.g. Context Menus for Chrome https://goo.gl/8hgwuB
- add a custom action for links, which sends the URL to

http://localhost:8009/?q=%s

where "%s" is the variable name for the selected URL

## Troubleshooting ##

- update youtube-dl:

youtube-dl -U
- if you got error message like "The TLS connection was non-properly terminated":

solution: https://github.com/mpv-player/mpv/issues/4425

quick solution for Raspberry Pi: https://gist.github.com/enzanki-ars/7d67996a90883e928bc1dd2db7ef0351

## How to use ##
- start this script in a shell window:

youda.py port [download-dir [check-dir [check-dir...]]]

example:
youda.py 8009 ~/Downloads/youtube /media/nexus7/storage/sdcard0/Podcasts/

If you specify download-dirs, duplications will be also

checked in these directories
- in your browser, right-click in a YouTube link and

select custom context menu item you've added
- this script will catch the URL and call youtube-dl with it

## Under the hood ##
- when you add a file, the web server thread creates a placeholder file
- the processing thread scans the directory, picks first placeholder file,
then replaces it with the downloaded file
- upon counter overflow, the items above 555 will appear before others,
e.g. the order will be: 910, 911, 922, 930, 001, 002, 003
- because the queue is stored in files, script can be restarted