l='some_user'
c = twint.Config()
c.Store_object = True
c.User_full = True
c.Username = l
twint.run.Followers(c)
foll = twint.output.users_list
with open(os.path.join(l+'.json'), 'w') as F:
F.write(json.dumps(foll))
I am unable to save this as JSON. It is giving error as "TypeError: Object of type user is not JSON serializable".
twint.output.users_list is a list, so you should iterate over it with a for loop
twint.output.users_listis a list, so you should iterate over it with a for loop
On printing the elements of that list, I am getting "
FYI, this is because user.py doesn't have a __repr__ method.
@Sakshimakkar here are the attributes https://github.com/twintproject/twint/wiki/User-attributes#attributes
You call attributes with the dot notation
@Sakshimakkar here are the attributes https://github.com/twintproject/twint/wiki/User-attributes#attributes
You call attributes with the dot notation
That Worked. Thank You :)
Calling values with dot notation is a miserable way to do this. I find it hard to believe there is not a more efficient way!