def __init__(self,
corpus,
friends=[],
commentary="None",
black_list=[],
local="world",
hashtag_search=None):
self.black_list = black_list
self.local = local
self.friends = friends
self.corpus = corpus
auth = tweepy.OAuthHandler(ConsumerKey, ConsumerSecret)
auth.set_access_token(AccessToken, AccessTokenSecret)
self.api = tweepy.API(auth)
entry = [("Date", [get_date()]),
("Followers", [len(self.api.followers_ids())]),
("Following", [len(self.api.friends_ids())]),
("Commentary", [commentary])]
self.df = pd.DataFrame.from_items(entry)
self.log()
if hashtag_search is None:
self.hashtag_search = self.get_trends(self.local)
else:
self.hashtag_search = hashtag_search + self.get_trends(self.local)
评论列表
文章目录