twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.71k stars 2.72k forks source link

--since and --until not working together and not able to geolocation of scraped tweets #719

Closed kotenyo closed 4 years ago

kotenyo commented 4 years ago

(venv) Ko-MacBook-Pro:SmartCity ko$ twint -g -s "traffic" --near 'London' --since "2020-01-01 00:00:00" -o Londontraff2020.csv --csv usage: python3 twint [options] twint: error: argument -g/--geo: expected one argument (venv) Ko-MacBook-Pro:SmartCity ko$

arthtalati commented 4 years ago

I think you can not use both together! You could use --since to get tweets for that year or --until to get tweets before the date you mention in descending order(by date). It would be interesting to know why would you need to use both of these commands together?

kotenyo commented 4 years ago

No problem I wanted to collect tweets for a specified period for analysis but I will just use - - since, my major issue lies in collecting the tweets geolocations to create an interactive map, is there any possible way to do this?

arthtalati commented 4 years ago

maybe you could use --Location feature in your csv and use geo coding to get (lat, long) coordinates.

lotsoaxolotls commented 4 years ago

I am trying to collect tweets for a given time period, searching by hashtag, but there's such a large volume of data that I want to gather the data week by week, then merge the data later.

I was hoping I could use --since and --until to do this.

Why can't they work together? I can specify both on Twitter's Advanced Search (in a browser), and it seems to work fine.

Aaronzinhoo commented 4 years ago

I use --since and --until for this exact purpose and they work together. What you need to do is provide the -g geo argument with an input. It requires "lat,long,radius" as the input. An example would be: --geo 35.1,-127.23,25mi. You can use mi or km for the geo argument. I would use geo over near since you have more control over the area you search for.

To get these coordinates I use this site which is very helpful! https://www.mapdevelopers.com/draw-circle-tool.php