Description
Download Easy German videos and transcripts (subtitles) and upload to Google Drive.
Setup (Mac OS X / Linux)
-
pip install easygerman
(Python 3+) - Enable YouTube and Google Drive APIs in Google Developer Console
- Create an API key https://console.developers.google.com/apis/credentials
- Add
export YOUTUBE_KEY=<apikey>
to~/.bash_profile
or~/.bashrc
- Follow a-g in Step 1 and add another environment variable in
~/.bash_profile
or~/.bashrc
calledGOOGLE_API_CLIENT_SECRET_FILE
pointing to the path of the downloaded file -
source ~/.bashrc
orsource ~/.bash_profile
- In
~/.credentials
there should be aJSON
file, e.g.drive-python-quickstart.json
. Rename this toeasy-german.json
- If error
ffprobe or avprobe not found. Please install one.
, install missing programs, e.g. on Ubuntusudo apt-get install -y libav-tools
as per here
Usage
import easy_german
easy_german.get_videos(max_downloads=150, max_results_per_page=20)
easy_german.get_transcripts()
Documentation
License
Contributing
See here.