WeSYNC

2017/09/28


Wesync

A simple python project that automatically synchronizes wechat files to Google Drive/Any Cloud Drive save PanBaidu
一個(gè)神奇的Python項(xiàng)目, 同步你的微信文件

原理

  • itchat第三方微信API登陸
  • 當(dāng)接收到圖片或文件時(shí), 調(diào)用下載并將文件儲(chǔ)存在內(nèi)存
  • 推送到integromat 然后自動(dòng)推送至云端儲(chǔ)存
  • 推送status_code與fileName至文件傳輸助手
    • 400
      • integromat 錯(cuò)誤, 建議查看History
    • 200
      • 請(qǐng)求成功
      • 同時(shí)返回下載連接

配置

Integromat

自動(dòng)化配置

  1. https://www.integromat.com/ 注冊(cè)
  2. 新建Scenario
    • Webhooks: Custom Webhook
      • Add webhook
        • Add Data Structure
          • Add item
            • data
              • Name: data
              • Type: text
            • filename
              • Name: filename
              • Type: text
      • Copy webhook url
    • Google Drive
      • Choose a folder
      • File name: filename
      • Data: toBinary(data; base64)
      • Error Handler (right click this module)
        • Webhook Response
          • Status: 400
        • Ignore
    • Webhooks: Webhook Response
      • Status: 200
      • Body: Share Link

Windows

git clone https://github.com/William-An/wesync
wesync/Scripts/activate
# 預(yù)先將webhook的URL在sync.py中賦值為integromat
python sync.py
# enableCmdQR一定要為True

更多信息詳見itchat文檔

Linux

TO BE Continue

注意事項(xiàng)

  • 云端儲(chǔ)存并不一定要Google Drive, 可以使用其他的云端服務(wù)像Dropbox
  • 上傳到Google Drive的文件是默認(rèn)開放查看權(quán)限的, 擁有鏈接的人就可以查看或下載, 請(qǐng)自行衡量
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容