Skip to content

privacyint/YouTubeWatcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

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

An automated, headless YouTube Shorts Watcher and Scraper

Original Authors: Christian C., Moritz M., Luca S.
Related Projects: YouTube Uploader, Twitch Compilation Creator, Neural Networks
Adapted for PI by: Ed Geraghty


About

Searches YouTube shorts, queries recommended videos and watches them. All fully automated.

Setup

YouTube Automation

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 or later! 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. Ensure the browser you wish to use is installed on the machine.
  5. 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 MS Edge Browser. To automate a different Browser use the --browser [chrome/firefox/edge] command line option.

Run Parameters

All of these parameters are optional and a default value will be used if they are not defined. You can also get these definitions by running main.py --help

usage: main.py [-h] [-H] [-B {chromium,firefox,edge}] -s SEARCH_TERMS [-c CHANNEL_URL]

optional arguments:
  -h, --help            show this help message and exit
  -H, --headless        run the browser headlessly
  -B {chromium,firefox,edge}, --browser {chromium,firefox,edge}
                        Select the driver/browser to use for executing the script. Defaults to Edge.
  -s SEARCH_TERMS, --search-terms SEARCH_TERMS
                        This argument declares a list of search terms which get viewed.
  -c CHANNEL_URL, --channel-url CHANNEL_URL
                        Channel URL if not declared it uses Privacy International's channel URL as default.