我使用 twint 包从 2016 年 1 月 1 日到 2021 年 1 月 1 日获取所有英文推文以搜索 btc,并将其保存为 csv 文件。我的代码如下所示(我使用的是 jupyter notebook)
import nest_asyncio
nest_asyncio.apply()
import twint
#configuration
config = twint.Config()
config.Search = "btc"
config.Lang = "en"
config.Since = '2016–01–01'
config.Until = '2021-01-01'
config.Store_csv = True
config.Output = "BTCtweet.csv"
#running search
twint.run.Search(config)
当我运行脚本时,出现以下错误: ValueError: time data '2016–01–01 00:00:00' does not match format '%Y-%m-%d %H:%M:%S'
我已经运行了没有Since和Until参数的脚本,它工作正常