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

  1. Channel Name
  2. Subscribers
  3. Published Date
  4. Description
  5. Views
  6. Likes
  7. Dislikes
  8. Total comments
  9. Comments
  10. Final Sentiment Score
  11. 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))

ytdir

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()

ytdf