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

Updated readme and added a jupyter notebook file #337

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ You'll see that there is no email/password options. Instead, the Youtube API use

The package used to include a default ```client_secrets.json``` file. It does not work anymore, Google has revoked it. So you now must [create and use your own OAuth 2.0 file](https://developers.google.com/youtube/registering_an_application), it's a free service. Steps:

* Go to the Google [console](https://console.developers.google.com/).
* Go to the Google [console](https://console.developers.google.com/). using your youtube channel's google account
* _Create project_.
* Side menu: _APIs & auth_ -> _APIs_
* Top menu: _Enabled API(s)_: Enable all Youtube APIs.
* Side menu: _APIs & services -> Dashboard_
* Top menu: _Enabled API(s) and services_: Search and Enable all Youtube APIs.
* Side menu: _APIs & auth_ -> _Credentials_.
* _Create a Client ID_: Add credentials -> OAuth 2.0 Client ID -> Other -> Name: youtube-upload -> Create -> OK
* Set up OAuth consent screen with setting s external and add your youtube channel's google account email address.
* Side menu: _APIs & auth_ -> _Credentials_.
* _Create a Client ID_: create credentials -> OAuth Client ID -> Application type: TVs and Limited Input devices -> Name: youtube-upload -> Create -> OK
* _Download JSON_: Under the section "OAuth 2.0 client IDs". Save the file to your local system.
* Use this JSON as your credentials file: `--client-secrets=CLIENT_SECRETS` or copy it to `~/client_secrets.json`.

Expand Down
82 changes: 82 additions & 0 deletions YT_upload_CLI.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "YT upload CLI.ipynb",
"provenance": [],
"authorship_tag": "ABX9TyMRZFgJwckvoXd3SbKBdQfg",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/chanukab7/youtube-upload/blob/master/YT_upload_CLI.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "code",
"metadata": {
"id": "O_wpy89nf_TQ"
},
"source": [
"!sudo pip install --upgrade google-api-python-client progressbar2\n",
"!pip install gdown\n",
"!wget https://github.com/chanukab7/youtube-upload\n",
"!unzip master.zip\n",
"%cd youtube-upload-master\n",
"!sudo python setup.py install"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "-fTmcuxmgfmL"
},
"source": [
"!gdown #drive link"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "xyPaeKFyhgLZ"
},
"source": [
"#if client secret file is uploaded newly,\n",
"#upload client secrets to /content/ folder then run\n",
"!mv /content/client*.json client_secrets.json"
],
"execution_count": 7,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "S5wdwA-6guO_"
},
"source": [
"!youtube-upload --title=\"#Title\" #vid_path --client-secrets /content/youtube-upload-master/client_secrets.json"
],
"execution_count": null,
"outputs": []
}
]
}