pip3 install --user --upgrade -e git+https://github.com/twintproject/twint.git@origin/master#egg=twint;
import twint
config = twint.Config()
config.Search = '"First language" AND "Most used" AND "Most loved"'
config.Store_json = True
config.Output = "data/languages.json"
config.Hide_output = True
twint.run.Search(config)
It looks like twint strips new lines from tweet text. JSON and CSV are both capable of containing newlines. New lines can sometimes be significant when you are analyzing tweets: for example like when parsing these tweets.
I was curious what they are being stripped out.
OS X (Mojave 10.14.6)
I just confirmed that I'm having the same issue. Latest Python/Twint under Windows Server 2012.
I don't know why \n are stripped out, I did not cover that part. Anyway I think it's better to not strip them out. The output might not be clean, and 'raw' saving (not to CSV or JSON) might not be really handy and cool.
So in the cases where c.Store_csv and c.Store_json are not specified, \ns are stripped out
Pushing updates right now
Thanks so much @pielco11!
Most helpful comment
I don't know why
\nare stripped out, I did not cover that part. Anyway I think it's better to not strip them out. The output might not be clean, and 'raw' saving (not to CSV or JSON) might not be really handy and cool.So in the cases where
c.Store_csvandc.Store_jsonare not specified,\ns are stripped outPushing updates right now