Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitter developer available easily for each user. These keys will help the API for authentication.
List object in Tweepy module contains the information about a list.
Here are the list of attributes in the List object :
- id : The ID of the list.
- id_str : The ID of the list as a string.
- name : The name of the list.
- uri : The URI of the list.
- subscriber_count : The number of subscribers of the list.
- member_count : The number of members of the list.
- mode : The mode of the list.
- slug : The slug of the list.
- full_name : The full name of the list.
- created_at : The time when the list was created at.
- following : Indicates wehther the authenticated user is following the list or not.
- user : The user object of the owner of the list.
Example : Use
get_list() method to fetch the list.
The id is : 4343 The id_str is : 4343 The name is : Thought Leaders The uri is : /kitson/lists/thought-leaders The subscriber_count is : 4066 The member_count is : 382 The mode is : public The slug is : thought-leaders The full_name is : @kitson/thought-leaders The list was created on : 2009-10-15 23:03:44 Is the authenticated user following the list? : False The screen name of the owner of the list is : kitson
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course