1

I am doing some research on sentiment analysis of tweets. I have been using twint to scrape tweets from selected cities where I was getting more tweets. when I compared to scraping tweets for the whole world for the same hashtag for a duration of 5 years from 2010 to 2015. I was not able to understand why twint is doing like that. Here is my code:

import twint
import pandas as pd
import nest_asyncio
nest_asyncio.apply()

cities=['Hyderabad','Mumbai','Kolkata','Vijayawada', 'Warangal', 'Visakhapatnam']
unique_cities=set(cities) #To get unique cities of country
cities = sorted(unique_cities) #Sort & convert datatype to list
for city in cities:
    print(city)
    config = twint.Config()
    config.Search = "#MarutiSuzuki"
    config.Lang = "en"
    config.Near = city
    config.Limit = 1000000
    config.Since = "2010–01–01"
    config.Until = "2015–12–01"
    config.Store_csv = True
    config.Output = "my_finding.csv"
    twint.run.Search(config)`
James Z
  • 12,209
  • 10
  • 24
  • 44
mohit sai
  • 11
  • 1

1 Answers1

0

Maybe Twitter has a limit for showing the number of tweets when searched globally, for example, it only showcases X entries but when you narrow down the search more specifically based on the location it shows the maximum amount for that area. For instance, Amazon would only show 400 pages of the searched item even though there may be more, likewise, if you specify the details it may show more items than with the previous search.