Quickstart
Eager to get started? This page gives a good introduction in how to get started with utuby. This assumes you already have utuby installed. If you do not, head over to the Installation section.
Building a YouTube source
Source objects are an abstraction of online multi-media content websites YouTube
Building a Source will extract its
- Channel Name
- Subscribers
- Published Date
- Description
- Views
- Likes
- Dislikes
- Total comments
- Comments
- Final Sentiment Score
- YouTube Comments DataFrame
Download it by clicking the green download button here on Github. You only need to parse specific YouTube URL as argument.
>>> from utuby.utuby import youtube
>>> url = 'https://www.youtube.com/watch?v=xjQFi-HP7po'
>>> youtube = youtube(url)
Directory of youtube class
>>> print(dir(youtube))
Extracting YouTube Channel Name
>>> youtube.channel_name
'Fully'
Examples Calculating Sentiment Scores for extracted YouTube Comments
>>> youtube.final_sentiment_scores
{'neu': 0.769, 'neg': 0.051, 'pos': 0.178, 'compound': 0.0}
Youtube Comments DataFrame
>>> youtube.youtube_comments_df.head()