Skip to main content

auto video machine,Upload videos to YouTube using geckodriver, Firefox profiles and Selenium/playwright.

Project description

video demo

currently I am working on a web and GUI app for those want to have a try, please sponsor me

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

if you are a selenium guy,pls check main branch,if not just use this playwright branch.

rewrite it with microsoft playwright

1.speed is much faster than selenium version

2.you dont have to worry browser driver any more

3.more like category setting,auto publish date,subtitle upload etc are considered

steps you can reproduce

if anything you dont understand ,just google it first,for example firefox profile

  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 modify source code, use as a library for your project,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. if you are dumb as me, wanna a try,run demo project
git clone https://github.com/wanghaisheng/autovideo

conda create -n autovideo python=3.9
conda activate autovideo

pip install -r requirements.txt

python auto_video.py

woola you can see a ugly gui for your demo purpose

  1. use existing without modification 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

pls check https://github.com/microsoft/playwright/issues/12616

manually change no_restriction to

   "sameSite": "None",

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

6 feed me hamburger

1hamburger is good

1hamburger

2hamburger is great

2hamburger

5hamburger I wont need lose weight.

5hamburger

Project details


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.12.tar.gz (21.2 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.12-py3.8.egg (54.7 kB view details)

Uploaded Egg

ytb_up-0.1.12-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ytb-up-0.1.12.tar.gz
  • Upload date:
  • Size: 21.2 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.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for ytb-up-0.1.12.tar.gz
Algorithm Hash digest
SHA256 e45dfcca7980fed3dc2c96c47984e8d1c698fbae6e00231a30f3c7bfda3bea0f
MD5 46f78d339a2710cbb7b5e38fae3eb5c2
BLAKE2b-256 cb7ede1c16cac316a23eeaadc4fcaae28368849707b1239ff981e4c4fb469ac3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ytb_up-0.1.12-py3.8.egg
  • Upload date:
  • Size: 54.7 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.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for ytb_up-0.1.12-py3.8.egg
Algorithm Hash digest
SHA256 2250f70c011e62b588cda38e0efd2adbbb1455df702a5c81295698823d38a738
MD5 1c0dc552db4b1579ea808214e006155f
BLAKE2b-256 bf6531cff3554c570a54bdb1c93476c205f5a0c50dc2de1d7ca71b1b339408f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ytb_up-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 29.6 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.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for ytb_up-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 59d9d4cb7007210e3b445a604e8b7d0e676df7cf1f10de3f864a6c24d8b4a43f
MD5 29683f522dbdf8d75f8186b2d13e9d3e
BLAKE2b-256 a7409e61214c10263a74fe4bdd2e3db0e116922b0daa7bec6fc5640bedd84bad

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 Pingdom Monitoring Sentry Error logging StatusPage Status page