Open batmanscode opened 1 year ago
Following up from: https://github.com/woluxwolu/twint/pull/14#issuecomment-1546783912
Any long keyword search or username scrape results in TokenExpiryException: Rate limit exceeded.
TokenExpiryException: Rate limit exceeded
Notes:
pip install git+https://github.com/catgirl-v/twint.git
git+...twint.git@fix-search
Code sample:
import os import twint import datetime import dateutil.relativedelta os.environ["TWITTER_AUTH_TOKEN"] = "1234" last_month = datetime.date.today() + dateutil.relativedelta.relativedelta(weeks=-4) search = ["btc", "bitcoin"] # if using in jupyter, the following might be needed # import nest_asyncio # nest_asyncio.apply() for item in search: c = twint.Config() c.Utc = True c.Full_text = True c.Search = item c.Stats = False c.Min_likes = 20 c.Since = str(last_month) c.Popular_tweets = False c.Custom["tweet"] = ["id", "conversation_id", "created_at", "date", "time", "username", "user_id", "name", "tweet", "language",\ "retweet", "quote_url", "likes_count", "retweets_count", "replies_count",\ "mentions", "urls", "photos", "video", "hashtags", "cashtags", "reply_to", "link"] c.Output = "btc.csv" c.Store_csv = True c.Min_wait_time = 120 twint.run.Search(c)
Following up from: https://github.com/woluxwolu/twint/pull/14#issuecomment-1546783912
Any long keyword search or username scrape results in
TokenExpiryException: Rate limit exceeded
.Notes:
pip install git+https://github.com/catgirl-v/twint.git
(also triedgit+...twint.git@fix-search
)Code sample: