Skip to content

Instantly share code, notes, and snippets.

View thiagodeschamps's full-sized avatar

Thiago thiagodeschamps

  • IFF
View GitHub Profile
@thiagodeschamps
thiagodeschamps / exemplo_tweepy.py
Last active December 20, 2018 13:56 — forked from marcoscastro/exemplo_tweepy.py
Obtendo tweets de usuário com Python e tweepy
import tweepy
auth = tweepy.OAuthHandler('46pvnSwIVylfWepbPsP4433wL', 'xWDPHaUkk0ub93qj1DaYgJcO8QtkPUhNFIE7uBAvzbSVLLpLzR')
auth.set_access_token('1952916806-9WbU9ROPLd4aVPprQZqWJhaW4RSXrBw4oK8A4Ow','gW5iuYPtrTxVhPmQxBemsKz6jCAOqbYx1fT0ewKHFyAkG')
api = tweepy.API(auth)
def obter_tweets(usuario, limite):
resultados = api.user_timeline(screen_name=usuario, count=limite)
tweets = []
for r in resultados:
@thiagodeschamps
thiagodeschamps / tweet_dumper.py
Last active December 20, 2018 01:03 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a text file
import tweepy
def get_all_tweets(screen_name):
auth = tweepy.OAuthHandler('---------------------', '-----------------------------------------------')
auth.set_access_token('------------------------------------','--------------------------=--')
api = tweepy.API(auth)
alltweets = []