All Projects → ContentAutomation → YouTubeUploader

ContentAutomation / YouTubeUploader

Licence: MIT license
An automated, headless YouTube Uploader

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to YouTubeUploader

automation-for-humans
Converts English statements to automation.
Stars: ✭ 67 (-42.24%)
Mutual labels:  selenium
qzone-spider
QQ 空间爬虫,基于 selenium 模拟登录空间,破解滑动验证码,拿到 cookies,然后使用 requests 抓取好友留言板的所有留言与回复,并生成词图。只抓了留言,本来还想抓说说,不过因为我已经好多年不玩 QQ 空间,感觉它对我已经没什么意义了,遂作罢。
Stars: ✭ 23 (-80.17%)
Mutual labels:  selenium
InstaBot
Simple and friendly Bot for Instagram, using Selenium and Scrapy with Python.
Stars: ✭ 32 (-72.41%)
Mutual labels:  selenium
google-image-downloader
A script to download images from images.google.com
Stars: ✭ 28 (-75.86%)
Mutual labels:  selenium
python-crawler
爬虫学习仓库,适合零基础的人学习,对新手比较友好
Stars: ✭ 37 (-68.1%)
Mutual labels:  selenium
FUTpuppeteer
This is an auto-clicker bot used to trade players and items on FIFA Ultimate Team's Web App.
Stars: ✭ 11 (-90.52%)
Mutual labels:  selenium
resgen
Keep track of jobs you've applied to, automate resume & cover letter creation; generate PDFs from .odt templates on the fly while scraping the job post and tracking employer status.
Stars: ✭ 31 (-73.28%)
Mutual labels:  selenium
webdriverio-zap-proxy
Demo - how to easily build security testing for Web App, using Zap and Glue
Stars: ✭ 58 (-50%)
Mutual labels:  selenium
selenium-java
This is the sample repository that we use in the Complete Selenium WebDriver with Java Bootcamp
Stars: ✭ 45 (-61.21%)
Mutual labels:  selenium
TwitPy
🕊TwitPy - Follow/Unfollow Automation
Stars: ✭ 92 (-20.69%)
Mutual labels:  selenium
vaccipy
Automatische Impfterminbuchung für www.impfterminservice.de
Stars: ✭ 548 (+372.41%)
Mutual labels:  selenium
devtools-proxy
Multiplexing proxy for Chrome DevTools. Fully compatible with Selenium and ChromeDriver
Stars: ✭ 64 (-44.83%)
Mutual labels:  selenium
weibo topic
微博话题关键词,个人微博采集, 微博博文一键删除 selenium获取cookie,requests处理
Stars: ✭ 28 (-75.86%)
Mutual labels:  selenium
TikTok
Download public videos on TikTok using Python with Selenium
Stars: ✭ 37 (-68.1%)
Mutual labels:  selenium
Spider
Spider项目将会不断更新本人学习使用过的爬虫方法!!!
Stars: ✭ 16 (-86.21%)
Mutual labels:  selenium
dnevnik mos ru
Python module to get easy machine access to dnevnik.mos.ru
Stars: ✭ 21 (-81.9%)
Mutual labels:  selenium
facebook-data-extraction
Experiences in extracting data from Facebook with these 3 methods: Facebook Graph API, Automation tools, DevTools Console
Stars: ✭ 81 (-30.17%)
Mutual labels:  selenium
python-data-from-web
API and web scraping workshops
Stars: ✭ 32 (-72.41%)
Mutual labels:  selenium
nightwatch101
使用 Nightwatch 實現 End-to-End Testing ★
Stars: ✭ 42 (-63.79%)
Mutual labels:  selenium
selenium-client
A PHP Selenium client
Stars: ✭ 31 (-73.28%)
Mutual labels:  selenium

Logo

MIT License Code style: black
Platform: YouTube Uses Docker Automation supporting Firefox and Chrome
Firefox supported Chrome supported

An automated, headless YouTube Uploader

Authors: Christian C., Moritz M., Luca S.
Related Projects: YouTube Watcher, Twitch Compilation Creator, Neural Networks


About

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!), we decided to create a headless uploader using Selenium and Docker. This approach also bypasses API restrictions (e.g. Rate Limits/Endcards can't be set through the API).

Note: Because the upload process is often updated by Google, the code might not work when you try it! Often, there are only minor changes that have to be made. If you find yourself in this situation, please open an Issue or provide a quick fix in form of a Pull Request to make sure that the codebase stays up to date!

This project is for educational purposes only. Automating video uploads to YouTube with automation software might be against YouTube's Terms of Service. Even though our tests went smoothly, one might encounter problems when using the YouTube Uploader extensively.

Setup

Dockerized Browser

To run the uploader in a headless mode, it needs to connect to a docker container. To test the uploader locally without using docker, this section can be skipped. Otherwise, the docker container can be started by executing the following steps:

  1. Install docker and docker-compose

Note: On Windows and Mac, docker-compose is already installed when installing docker.

  1. Clone/Download this repository
  2. Navigate to the root of the repository
  3. Run docker-compose up to start the docker container (append -d if you want to run it in a detached mode)

Note: Selenium can now connect to the browser via port 4444. In Python the connection can be established with the following command.

driver = webdriver.Remote(
    command_executor="http://127.0.0.1:4444/wd/hub",
    desired_capabilities=DesiredCapabilities.FIREFOX,
)

See main.py for more information.

  1. Continue with the YouTube Uploader Setup

YouTube Uploader

This project requires Poetry to install the required dependencies. Check out this link to install Poetry on your operating system.

Make sure you have installed Python 3.8! Otherwise Step 3 will let you know that you have no compatible Python version installed.

  1. Clone/Download this repository
  2. Navigate to the root of the repository
  3. Run poetry install to create a virtual environment with Poetry
  4. In a browser of your choice, login into the YouTube account that you want to use the uploader with
  5. Use a cookie extraction tool to extract the YouTube cookies into a JSON file (for example EditThisCookie [Chrome] or Cookie Quick Manager [Firefox])

Note: This is required so that the uploader is automatically logged in into the YouTube account using the cookies. Performing a Google login through automated software is extremely hard due to Google's bot detection/Login safety features

  1. Either run the dockerized Browser with docker-compose up, install geckodriver for a local Firefox or ChromeDriver for Chromium. Ensure that geckodriver/ChromeDriver are in a location in your $PATH.
  2. Run poetry run python main.py to run the program. Alternatively you can run poetry shell followed by python main.py. By default this connects to the dockerized Firefox Browser (headless). To automate a different Browser (not-headless) use the --browser [chrome/firefox] command line option.

Note: When using Docker, the video that should be uploaded needs to be in the repository's uploads folder. This is because REPOSITORY_ROOT/uploads/ is mounted to /uploads/ in the Docker container. Therefore, the video_path argument has to be passed in the following format: /uploads/VIDEO_FILE_NAME.xxx

Run Parameters

You can also get these definitions by running main.py --help

usage: main.py [-h] [-B {docker,chrome,firefox}] -l LOGIN_COOKIES [--thumbnail-path THUMBNAIL] -t TITLE -d DESCRIPTION [-g GAME] [-k KIDS] [-ut UPLOAD_TIME] video_path

positional arguments:
  video_path            Path to the video file. When using docker, this path has to be inside the container (default mount is /uploads/).

optional arguments:
  -h, --help            show this help message and exit
  -B {docker,chrome,firefox}, --browser {docker,chrome,firefox}
                        Select the driver/browser to use for executing the script (default: docker).
  -l LOGIN_COOKIES, --login-cookies-path LOGIN_COOKIES
                        A json file that contains the cookies required to sign into YouTube in the target browser.
  --thumbnail-path THUMBNAIL, -T THUMBNAIL
                        Path to the thumbnail file (default: None).
  -t TITLE, --title TITLE
                        This argument declares the title of the uploaded video.
  -d DESCRIPTION, --description DESCRIPTION
                        This argument declares the description of the uploaded video.
  -g GAME, --game GAME  This argument declares the game of the uploaded video (default: None).
  -k KIDS, --kids KIDS  Whether the video is made for kids or not. (default: False)
  -ut UPLOAD_TIME, --upload_time UPLOAD_TIME
                        This argument declares the scheduled upload time (UTC) of the uploaded video. (Example: 2021-04-04T20:00:00)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].