ytutils
YouTube video & channel details extractor
Pypi Website
Features
- Extract video details
- Extract channel details
Installation
pip install ytutils
Video Extraction
Importing
from ytutils.Video import Video
Step-1
api_key = "YOUR API KEY"
vid = Video(api_key)
Step-2
try:
vid.start(video_url="https://www.youtube.com/watch?v=hW7qJZK2UAc") # Or vid.start(video_id="hW7qJZK2UAc")
except:
pass # Error occurred
Step-3
details = vid.result()
print(details['title'])
Channel Extraction
Importing
from ytutils.Channel import Channel
Step-1
api_key = "YOUR API KEY"
cha = Channel(api_key)
Step-2
try:
cha.start(channel_url="https://www.youtube.com/channel/UC_yAFedtY2po4noljIqSM1w") # Or cha.start(channel_id="UC_yAFedtY2po4noljIqSM1w")
except:
pass # Error Occurred
Step-3
details = cha.result()
print(details['title'])