Skip to main content

Python package to extract YouTube video titles and URLs

Project description

Automate a YouTube Channel Videos List Creation

Overview

This repo is intended to provide a quick, simple way to create a list of all videos posted to any YouTube channel by providing just the URL to that user's channel videos. The general format for this is https://www.youtube.com/user/TheChannelYouWantToScrape/videos OR
https://www.youtube.com/channel/TheChannelYouWantToScrape/videos,
with TheChannelYouWantToScrape replaced with the username of the channel.

Quick Start

git clone git@github.com:Shail-Shouryya/yt_videos_list.git
cd yt_videos_list

Running as a module

python3
from yt_videos_list import ListGenerator
LG = ListGenerator()

There are two types of YouTube channels: one type is a "user" channel and the other is a channel channel.

To scrape the video titles along with the link to the video, you need to run the generate_list(channelName, channelType) method on the ListGenerator object you just created, substituting the type of channel for channelType argument and the name of the channel for the channelName argument.

user channelType (example uses sentdex):

LG.generate_list('sentdex', 'user')

channel channelType (example uses Billie Eilish):

LG.generate_list('UCiGm_E4ZwYSHV3bcW1pnSeQ', 'channel')

Running as a script (coming soon!)

Enter the directory in which the pyYT_videos_list.py and execute.py exist (they should both be in the same directory to avoid refernce issues), and run the following command from your command line

python3 yt_videos_list

You should see the following:

What is the name of the YouTube channel you want to generate the list for?
If you're unsure, click on the channel and look at the URL.
It should be in the format:
https://www.youtube.com/user/YourChannelName
OR
https://www.youtube.com/channel/YourChannelName
Substitute what you see for YourChannelName and type it in below:

Enter the name of the channel or user that you wish to scrape, and the program will do the rest for you!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yt_videos_list-0.1.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file yt_videos_list-0.1.2.tar.gz.

File metadata

  • Download URL: yt_videos_list-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for yt_videos_list-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b0c66081091019882c0c756a99eb96106065ba9040664002ca6d1381ea34112d
MD5 bc6b66fd0ebb414f999fce053c19db16
BLAKE2b-256 21d6e9fcd02a9e5b079322ebf51ec839630d65640371dd8c187d1bf466b78c4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page