added twitter analysis to dump usernames for someone near a given area
This commit is contained in:
parent
73c00093a6
commit
1b2655aa0b
2 changed files with 14 additions and 0 deletions
13
twitter_analysis/get_users_near_city.py
Executable file
13
twitter_analysis/get_users_near_city.py
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# pull list of twitter users via city
|
||||||
|
# twint - https://github.com/twintproject/twint
|
||||||
|
|
||||||
|
import twint
|
||||||
|
# enter in a city and it will gather the users in that area on twitter.
|
||||||
|
|
||||||
|
def get_users(city):
|
||||||
|
c = twint.Config()
|
||||||
|
c.Near = "{}".format(city)
|
||||||
|
c.Format = "{user_id}, {username}"
|
||||||
|
r = twint.run.Search(c)
|
||||||
|
return list(r)
|
1
twitter_analysis/requirements.txt
Normal file
1
twitter_analysis/requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
twint==1.1.4.3
|
Loading…
Add table
Reference in a new issue