Skip to main content

This project aims to automate the upload process for YouTube Videos. Since videos can only be publicly uploaded through the YouTube Data API by using a Google Workspaces Account (not free!), I decided to figure out a headless uploader using Selenium. This approach also bypasses API restrictions (e.g. Rate Limits/Endcards can't be set through the API).There are tons of library existing but not for me .

AS a code dummy,I do accept any advice because of my only purpose is to get things work

  1. Download lastest firefox,open new tab and insert:
about:profiles

一般来说 一个youtube帐号要新建一个profile 文件夹可以选在assets下

2.install firefox addon, Cookie-Editor,mannually login into youtube channel,click profile icon, choose english language,export a cookie.json

  1. if you want to ajust source code, pls do

git clone https://github.com/wanghaisheng/ytb_up
pip install -r requirements.txt

all codes under **ytb_up**, twist them as you wish

  1. run demo project
git clone https://github.com/wanghaisheng/autovideo

conda create -n autovideo python=3.9
conda activate autovideo

下面这两个二选一就行
pip install -i http://mirrors.aliyun.com/pypi/simple/ requests pillow itemdbs selenium-wire moviepy ytb_up

pip install -i  https://pypi.tuna.tsinghua.edu.cn/simple requests pillow itemdbs selenium-wire moviepy ytb_up
python auto_video.py
  1. use as a lib
pip install ytb-up

features YOU MAY NEED

1. proxy support

auto detect whether need a proxy

2. cookie support

for those multiple channels under same google account

3. schedule time publish

you can explictly specify a date and time for each video or you can set publish policy and daily public count,for example,daily count is 4,you got 5 videos,then first 4 will be published 1 day after the upload date ,the other 1 will be 2 days after the upload date

4. fix google account verify

5. seleniumwire

THANKS FOR

  1. https://github.com/ContentAutomation/YouTubeUploader
  2. https://github.com/offish/opplast
  3. other I CAN NOT REMEMBER

配置文件说明 publishpolicy:1 表示上传以后立即公开 0 表示上传以后保持私享 2表示结合每天发布数量和视频文件夹中的数量 从上传当日起开始定时公开

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ytb-up-0.1.7.tar.gz (13.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ytb_up-0.1.7-py3.8.egg (25.1 kB view details)

Uploaded Egg

ytb_up-0.1.7-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file ytb-up-0.1.7.tar.gz.

File metadata

  • Download URL: ytb-up-0.1.7.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

File hashes

Hashes for ytb-up-0.1.7.tar.gz
Algorithm Hash digest
SHA256 923d5771712f360235dca72297d12039950b7ab24fc65716d91ad57cc1e285f3
MD5 13d6f74c140b66c2724efe6dd68551a3
BLAKE2b-256 fe9d69e27839bb65d91d36b8f18abd20ad314c57c6320f47e3c3f4c85f946612

See more details on using hashes here.

File details

Details for the file ytb_up-0.1.7-py3.8.egg.

File metadata

  • Download URL: ytb_up-0.1.7-py3.8.egg
  • Upload date:
  • Size: 25.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

File hashes

Hashes for ytb_up-0.1.7-py3.8.egg
Algorithm Hash digest
SHA256 97455b0474eb3c4662c15ca4e4b461d949119ff497049651b7eb841dc1e27d65
MD5 f9b472b9e679e519df713b9ba8cd7d84
BLAKE2b-256 5f79847f40faf1fdfcf21e2108c0d7bb73367786b37d39378cf2a5195160d306

See more details on using hashes here.

File details

Details for the file ytb_up-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: ytb_up-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

File hashes

Hashes for ytb_up-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 eee695c9f2cf15f36819ad18b7c7ad0ec767260c6c178fe6ab7eab77a9a3a4cf
MD5 5d65dc26521c4e589f273089552484d0
BLAKE2b-256 9d233482c6d4d87a2c7788efe5cc686f0b7289db79cda776382b2a8a91b834cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page