Python package to extract YouTube video titles and corresponding URLs for a specific channel and write the information to CSV and txt files with sections to mark a particular video as watched, to mark a video for rewatching, and for taking notes.
Project description
python3.6+ Quick Start
This package uses f-strings (more here) and as such requires Python 3.6+. If you have an older version of Python, you can download the Python 3.8.2 macOS 64-bit installer, Windows x86-64 executable installer, Windows x86 executable installer, or the Gzipped source tarball (most useful for Linux) and follow the instructions to set up Python for your machine. If you want to install a different version, visit the Python Downloads page and select the version you want.
Once you do that, enter the following in your command line:
# if something isn't working properly, try rerunning this
# the problem may have been fixed with a newer version
pip3 install -U yt-videos-list
# no "3" on Windows: pip install -U yt-videos-list
Running the package from the python interpreter
python3
# no "3" on Windows: python
from yt_videos_list import ListCreator
my_driver = 'firefox' # SUBSTITUTE THE DRIVER YOU WANT
lc = ListCreator(driver=my_driver, scroll_pause_time=0.8)
# "user" channel_type (example uses Corey Schafer):
lc.create_list_for(url='https://www.youtube.com/user/schafer5')
# "channel" channel_type (example uses freeCodeCamp) along with the optional file_name argument:
lc.create_list_for(url='https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ', file_name='freeCodeCamp_org')
# see the new files that were just created:
import os
# MacOS and Linux users:
os.system('ls -lt | head')
# Windows users:
os.system('dir /O-D | find "_videos_list"')
# for more information on using the module:
help(lc)
- options for
my_driver
include:my_driver = 'firefox'
my_driver = 'opera'
my_driver = 'safari'
my_driver = 'chrome'
my_driver = 'brave'
my_driver = 'edge'
(Windows only!)
- increase
scroll_pause_time
for laggy internet and decreasescroll_pause_time
for fast internet
Running the package from the CLI as a script using -m (coming in yt-videos-list 2.0
!)
python3 -m yt_videos_list
More API information
Back to main page
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.