Closed rodolfo-viana closed 5 years ago
Hi @rodolfo-viana
config.Custom
is a dict with only tweet
, user
and username
as keys
https://github.com/twintproject/twint/blob/653de504f7a7d65ec1dabf0cc67b141555780009/twint/config.py#L20
Those three are the entities returned, tweet
stands for tweet (so the content, the date, the user that tweeted, etc), user
stands for the user which you are scraping (so the bio, the number of following/followers, join date, etc.) and username
stands for the username of the follower/following that you scraped from a target user.
It seems that you are interested in almost every field of a user
object, so you do not need to specify that you want every field since this is the default situation.
Just remove these lines:
i.Custom["id"] = ["id"]
i.Custom["name"] = ["name"]
i.Custom["username"] = ["username"]
i.Custom["bio"] = ["bio"]
i.Custom["location"] = ["location"]
i.Custom["url"] = ["url"]
i.Custom["join_date"] = ["join_date"]
i.Custom["join_time"] = ["join_time"]
i.Custom["tweets"] = ["tweets"]
i.Custom["following"] = ["following"]
i.Custom["followers"] = ["followers"]
i.Custom["likes"] = ["likes"]
i.Custom["media"] = ["media"]
i.Custom["private"] = ["private"]
i.Custom["verified"] = ["verified"]
i.Custom["avatar"] = ["avatar"]
Thank you, @pielco11, for taking some time to explain it. :) The problem is... I did no specification on my first try and got just the bio. So I decided to specify each and every field and again got only bio returned. I will check what I did wrong and let you know soon. Once again, thanx.
Found it! I had cloned the repo some time ago and forgot to upgrade it. My bad, @pielco11. And thanks for your help.
Issue Template
Please use this template!
Initial Check
pip3 install --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
;Command Ran
Description of Issue
Environment Details
Win10, Jupyter Lab, no Anaconda.