这个Python脚本可以将一个或多个推特账号的更新推送至QQ,并且可以机翻,使用python方便扩展更多功能。
首先需要 酷Q Pro (使用酷Q Air将无法发送图片)并在 这里 按照教程配置好 CQhttp 插件 爬虫部分采用 RSSHub。 Python依赖在request.txt中
git clone git@github.com:Audirntttttttt/TwitterToQQPy.git
cd TwitterToQQPy
pip install -r requirements.txt
在酷Q目录下\data\app\io.github.richardchien.coolqhttpapi\config
的json文件中,修改以下选项:
"port": 你使用的接口,
"use_http": true,
"use_ws": false,
"access_token": "your token",
"secret": "your secret",
在本项目的目录下,修改config.py:
access_token = 'your access_token'
secret = 'your secret'
api_root = '酷Qhttp运行的地址'
与上方的配置相对应
在这里申请百度翻译的API的接口,并修改config.py:
#百度翻译的appid与secretKey
appid = 'your appid'
secretKey = 'your secretkey'
在config.py中设置,config.py有详尽的说明。
配置完成后
python main.py
或者
pm2 start main.py --interpreter=python3