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)`