youtubepy is a package to search for youtube videos with python
Project description
youtubepy
youtubepy is a package to search for youtube videos through python code.
Usage
from youtubepy import Video
video = Video("me at the zoo")
result = video.search()
print(result)
> https://www.youtube.com/watch?v=A8AlbaDmaec
SafeSearch Filter
from youtubepy import Video
video = Video("fuck", safesearch=True)
result = video.search()
print(result)
> "youtube.BlockedWordError: A blocked word detected in the result video! Don't use safesearch to ignore this error!"
Attributes available for Video
search() - Returns video url
title() - Returns video title
description() - Returns description of the video
channel_url() - Returns the url of the channel that published the video
channel_name() - Returns the name of the channel that published the video
published_date() - Returns the date the video was published to YouTube
thumbnail_url() - Returns thumbnail url of the video
thumbnail_save(/path/to/directory/to/save/filename.jpg) - Saves the thumbnail of the video, if path is not given, saves to the path in which the script is saved
duration() - Returns duration of the video
view_count() - Returns view count of the video
like_count() - Returns like count of the video
dislike_count() - Returns dislike count of the video
average_rating() - Returns average rating of the video
from youtubepy import ExtractInfo
video = ExtractInfo("https://youtu.be/A8AlbaDmaec")
title = video.title()
print(title)
> Me at the zoo - 4k Upscaled, 60 FPS
Attributes available for ExtractInfo
title() - Returns video title
description() - Returns description of the video
channel_url() - Returns the url of the channel that published the video
channel_name() - Returns the name of the channel that published the video
published_date() - Returns the date the video was published to YouTube
thumbnail_url() - Returns thumbnail url of the video
thumbnail_save(/path/to/directory/to/save/filename.jpg) - Saves the thumbnail of the video, if path is not given, saves to the path in which the script is saved
duration() - Returns duration of the video
view_count() - Returns view count of the video
like_count() - Returns like count of the video
dislike_count() - Returns dislike count of the video
average_rating() - Returns average rating of the video
Latest and the fastest working version! You may experience bugs and glitches in other versions
Warning - Do NOT install other versions of this library!
Note - This package is currently under development
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.
Source Distribution
youtubepy-4.3.3.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for youtubepy-4.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6614c3ec4f37f6397802d48db76323e5d4cd4eb265f268c27fda54224b42ae5a |
|
MD5 | 614546afc4ca16a2931b51e66b769da9 |
|
BLAKE2b-256 | b357478bfcc053423913d4b4bd2c900981c45e0eabbfaa41f35b8a7604e13fe4 |