Open ghost opened 3 years ago
this is what you'd need for handling mentions
on line 34 in format.py
, because in the new implementation mentions
is not a list, instead it is a dict :
34 output = output.replace("{mentions}", ",".join([json.dumps(mention) for mention in t.mentions]))
Originally posted by @himanshudabas in https://github.com/twintproject/twint/issues/960#issuecomment-707859707
You have to implement this either by making a fork or modifying the local twint directory. You also need to import json at the top of the file
i tried above change but Tweet.mentions on db.py is still dict instead of string
my solution is use the same method as mentioned on db.py
above patch is based on a45a8ac and also include some error i found when running following command
$ twint --username username --database tweet.db --debug
e: above patch is outdated, updated patch is on my branch here https://github.com/rachmadaniHaryono/twint/tree/develop
Initial Check
pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint
;Command Ran
Description of Issue
at first i thought it was a simple mistake with types in my own code, but i stripped it all the way down to the base code after performing all tests and i get the same result no matter what.
Environment Details
Ubuntu 20.04, XFCE4 Terminal, Python3.8