This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#using pygithub - https://github.com/PyGithub/PyGithub | |
from github import Github | |
g = Github("user", "pass") | |
events = g.get_repo('repo').get_events() | |
out = [] | |
for event in events: | |
out.append([event.actor.name, event.created_at, event.type]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twython import Twython | |
import csv | |
twitter = Twython(APP_KEY, APP_SECRET, | |
OAUTH_TOKEN, OAUTH_TOKEN_SECRET) | |
followers = twitter.get_followers_list(screen_name = "yourusername", count = 200) | |
following = twitter.get_friends_ids(screen_name = "yourusername") | |
with open("twitter.csv", 'w', newline='') as csvfile: | |
writer = csv.writer(csvfile, delimiter=',') | |
writer.writerow(["name", "tweets", "following", "followers", "I'm following"]) |