Simple script that goes through YT links from a file and checks if any of the video's title contains a specified string.
- Unix
# 1. Create virtual env: python3 -m venv venv # 2. Activate virtual env: source venv/bin/activate # 3. Install required pkgs: pip install -r requirements.txt
- Windows
# 1. Create virtual env: python3 -m venv venv # 2. Activate virtual env: .\venv\Scripts\activate # 3. Install required pkgs: pip install -r requirements.txt
-
Create an
input.txt
file with links to YouTube videos / shorts separated by new line:https://www.youtube.com/watch?v=r6tH55syq0o https://www.youtube.com/shorts/qol2X_8JF9I https://www.youtube.com/watch?v=BPadRwJbylY
-
Open
script.py
and enter the string you're searching for in thestring_to_check_for
variable:string_to_check_for = "changing"
-
Run the script:
python3 script.py
-
After the progress bar finishes (don't worry it will stop for a few seconds every
15
requests) you can open theoutput.txt
file and easily search it for the videos that either do or don't include the string you're interested in their title (it'sTrue
for those that do andFalse
for those that don't)*In vim:
g!/True/d
/g!/False/d