Skip to content

Simple script that goes through YT links from a file and checks if any of the video's title contains a specified string.

License

Notifications You must be signed in to change notification settings

ErykDarnowski/check-yt-title-for-str

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check YT title for str

Simple script that goes through YT links from a file and checks if any of the video's title contains a specified string.

Setup

  • 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

Usage

  1. 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
    
  2. Open script.py and enter the string you're searching for in the string_to_check_for variable:

    string_to_check_for = "changing"
  3. Run the script:

    python3 script.py
  4. After the progress bar finishes (don't worry it will stop for a few seconds every 15 requests) you can open the output.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's True for those that do and False for those that don't)

    *In vim: g!/True/d / g!/False/d

About

Simple script that goes through YT links from a file and checks if any of the video's title contains a specified string.

Topics

Resources

License

Stars

Watchers

Forks

Languages