0
tags = pd.read_csv("tags.csv", header=None)

words = []
for i in range(tags.shape[0]):
    words.append(str(tags[0][i]))

# Relevant #tags on Twitter
search_words = words

# Exclude retweets in our search
new_search = []
for i in range(len(search_words)):
    new_search.append(search_words[i] + " -filter:retweets")
for i in range(len(new_search)):
    # performs the search using the defined variables
    for tweet in limit_handled(tweepy.Cursor(api.search,
                           q=new_search[i],
                           count=count,
                           tweet_mode='extended',
                           lang=lang,
                           geocode=geocode,
                           result_type=result_type,
                           include_entities=include_entities,
                           since=date_since,
                           until=date_until).items(totalTweets)):

Is it possible to search multiple tags/words using iterator as a argument to q in

tweepy.Cursor(q="one string at a time OR multiple")

Saicharan Pogul
  • 89
  • 2
  • 11

1 Answers1

1

I assume it might be due to the rate limit restriction, did you tried setting the wait_on_rate_limit to true while creating api

api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)

premkumar
  • 26
  • 3