def follow_congresspeople(self):
"""
Friend all congresspeople accounts on Twitter.
"""
profiles = pd.concat([self.profiles()['twitter_profile'],
self.profiles()['secondary_twitter_profile']])
for profile in profiles[profiles.notnull()].values:
try:
self.api.CreateFriendship(screen_name=profile)
except twitter.TwitterError:
logging.warning('{} profile not found'.format(profile))
评论列表
文章目录