使用telegram的机器人下载文件到谷歌网盘
使用telegram的机器人下载文件到谷歌网盘 项目地址 https://github.com/lzzy12/python-aria-mirror-bot
https://github.com/magneto261290/magneto-python-aria
编辑环境变量文件 生成telegraph的token
python3 generate_telegraph_token.py d73ae03dd0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXebaf2e161 填写到TELEGRAPH_TOKEN
API_KEY 输入api_id API_HASH 输入 api_hash bot token输入BotFather获取到的bot的token
获得USER_SESSION_STRING
AQCUOk4LsAukvKVZ9k1JK5H2Oo4EtWEJF4sQQ9RkG2fCkLWsZdk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXpy_gPZI42i70rerTWeWLD70a_cd_eHswSU1_IbFjTMexTiA2BgE 到 https://my.telegram.org/ 申请api TELEGRAM_API 填写App api_id TELEGRAM_HASH 填写App api_hash OWNER_ID 到 https://t.me/userinfobot 获取自己的Id
开启谷歌网盘授权 开启drive api https://developers.google.com/drive/api/v3/quickstart/python
安装依赖
pip3 install google-api-python-client google-auth-httplib2 google-auth-oauthlib 下载credentials.json并上传到服务器
生成token
python3 generate_drive_token.py root@server:~/test/m2g/mirror-bot# python3 generate_drive_token.py Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Enter the authorization code: 4/5AHj9dOAl1h2Kih7zWkCCdY8VtZDrP4TxhYgQ0D4guA4CMnWXJELCD0 docker build .……