Commit f84edea2 authored by aldou's avatar aldou Committed by Francesco Poldi

Expand userlist support for other queries (#187)

* Expand userlist support for other queries

Expand the support for an input list of usernames for scraping favorites, following, and followers of the listed usernames

* Expand userlist support for other queries

Expand the support for an input list of usernames for scraping favorites, following, and followers of the listed usernames

* Update Twint.py

* fixed indentation issues

* Update Twint.py
parent 153a7517
...@@ -218,11 +218,32 @@ def main(): ...@@ -218,11 +218,32 @@ def main():
c = initialize(args) c = initialize(args)
if args.favorites: if args.favorites:
twint.run.Favorites(c) if args.userlist:
_userlist = loadUserList(args.userlist, "favorites")
for _user in _userlist:
args.username = _user
c = initialize(args)
twint.run.Favorites(c)
else:
twint.run.Favorites(c)
elif args.following: elif args.following:
twint.run.Following(c) if args.userlist:
_userlist = loadUserList(args.userlist, "following")
for _user in _userlist:
args.username = _user
c = initialize(args)
twint.run.Following(c)
else:
twint.run.Following(c)
elif args.followers: elif args.followers:
twint.run.Followers(c) if args.userlist:
_userlist = loadUserList(args.userlist, "followers")
for _user in _userlist:
args.username = _user
c = initialize(args)
twint.run.Followers(c)
else:
twint.run.Followers(c)
elif args.retweets or args.profile_full: elif args.retweets or args.profile_full:
if args.userlist: if args.userlist:
_userlist = loadUserList(args.userlist, "profile") _userlist = loadUserList(args.userlist, "profile")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment