Skip to main content

Python Package: YouTuber

YouTuber Pypi Version Contributor Covenant Python Version Code convention Black Fomatter

Contains several useful features that can be used for youtube related projects. This package is intended to provide useful features for video editing, including crawling through the YouTube Data API v3 and Selenium.


Installation

pip install youtuber

from youtuber import AutoCrawler
DEVELOPER_KEY = "enter_your_dev_api_key"               # Enter your DEV API KEY at https://console.cloud.google.com/apis/api/youtube.googleapis.com/credentials?project=sincere-canyon-278402
CHOROME_PATH = r'C:\Program Files\chromedriver.exe'    # Enter path of 'chromdriver.exe' 

auto = AutoCrawler(DEVELOPER_KEY, CHOROME_PATH)
search_keyword = 'chatGPT'      # Youtube Search Keyword
max_link_len = 2                # How many videos you target to crawl?
max_comment_pg_len = 2          # How many comment pages you target to crawl?
save_path = './enter/any/path/result.csv'

df = auto.run(search_keyword, max_link_len, max_comment_pg_len, save_path)

Tutorial

  1. Main tutorial: https://github.com/DSDanielPark/youtuber/blob/main/doc/tutorial.ipynb
  2. Sub tutorial folder: Tutorials for each function can be found in this folder.

Features

1. YoutubeAPI

Retrieve YouTube search results.
You can get your 'Youtube Data API v3' key in here, and you can find some guide in here.

from youtuber import YoutubeAPI

DEVELOPER_KEY = "enter_your_api_key"
youtuber_v3 = YoutubeAPI(DEVELOPER_KEY)
links = youtuber_v3.get_links('chatGPT', 3) #YouTube Search Keyword = 'chatGPT', return 3 links.

links
['https://www.youtube.com/watch?v=xxxxx',
 'https://www.youtube.com/watch?v=xxxxx',
 'https://www.youtube.com/watch?v=xxxxx']

2. YoutubeCrawler

Retrieve comment data.

from youtuber import YoutubeCrawler

chrome_driver = r'C:\Program Files\chromedriver.exe'
youtuber_crawl = YoutubeCrawler(chrome_driver)
df = youtuber_crawl.get_comment_df(links, 1) #if you enter 1, only 1 page of comments will be searched.

df #You can get pd.DataFrame object.

References

[1] YouTube Data API v3: https://developers.google.com/youtube/v3/getting-started?hl=ko
[2] Selenium python: https://selenium-python.readthedocs.io/



Important Warning: All legal responsibilities associated with the use of the package lie with the user.

The Python package "youtuber" provides code for Python users to easily access data through the YouTube Data API v3 and Selenium. All licenses follow those of the API and dependent packages, and all responsibility for handling data and using the package lies with the user. There is no monetary compensation received for the use of this code, and it should be noted that there is no liability for the use of the code.

Metadata

Release files for youtuber 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for youtuber 0.1.4
File Size Uploaded
youtuber-0.1.4.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for youtuber 0.1.4
File Interpreter ABI Platform
youtuber-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / youtuber-0.1.4.tar.gz

Download URL youtuber-0.1.4.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
286801a21d1b1a1be8920773c7acb5e08096a7ea1f3c644662f550d83e40ab15
BLAKE2b-256 checksum
How to use checksums
7722fd9b77c9d1fc52939d150210d070b5e57e712c276683934c9a8b33a0112e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release files / youtuber-0.1.4-py3-none-any.whl

Download URL youtuber-0.1.4-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7bc5c04617adf78db7beef46b36663da3cae45064ae7860324f2514e49c93df
BLAKE2b-256 checksum
How to use checksums
7ffb5de11b1578a78486b804f1d893e2d54c67be48a3bfff33fd6bcd493773b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page