def __init__(self, CK=CK,CS=CS,AT=AT,AS=AS, byGetF=True):
self.SAMPLE_NUM = 50
# if it's 1.0, ex) follow=100 and follower=0
# if it's 0.5, ex) follow=100 and follower=100
# if it's 0.25 ex) follow=33 and follower=100
self.MIN_FRIENDS_RATIO = 0.35
# 1 month
self.MAX_DAY_SPAN = 7*4.
# if it's 1.0, all tweets have url or hashtag
self.MIN_HASHURL_RATIO = 0.55
auth = tweepy.OAuthHandler(CK, CS)
auth.set_access_token(AT, AS)
self.API = tweepy.API(auth, api_root='/1.1', wait_on_rate_limit=True)
self.ME = self._getMe()
if byGetF:
# self.friends is not used now
# self.friends = self.getFriendIds(self.ME)
self.friends = []
self.followers = self.getFollowerIds(self.ME)
评论列表
文章目录