Update README

This commit is contained in:
David Doblas Jiménez 2023-12-09 19:21:18 +01:00
parent aa54fedcb3
commit 3214983b72

View File

@ -0,0 +1,39 @@
# How to use the script
## Installation of the libraries
Create a venv:
```
$ python -m venv api
```
Activate the venv:
```
$ source ./api/bin/activate
```
Install the following libraries:
```
# Google APIs Client Library for Python
(api) $ pip install --upgrade google-api-python-client
# The google-auth-oauthlib and google-auth-httplib2 libraries for user authorization.
(api) $ pip install --upgrade google-auth-oauthlib google-auth-httplib2
```
Now we're all set!
## Usage of the script
*The following command assumes that you own a YouTube channel with some playlists.
In a terminal with the `api` venv activated, type:
```
(api) $ python youtube_api.py channel video_ID
```
where `playlist_name` is the name of the playlist where you want to insert the
video `video_ID`.
A new browser instance will pop up where you will have to identify yourself and
follow the instructions. Use `username`, `password` and `phone number` from
`my_credentials`.