這個程序是用來抓取外賣平臺(美團,餓了麼,百度)的商戶訂單開發,並非一個通用庫,而是爲這個 特定場景進行開發的。
適用場景:餐飲企業擁有多家外賣門店,訂單量很是大,有對訂單進行數據分析的需求。
主要功能:天天定時啓動,抓取三大外賣平臺的訂單,轉成成excel文件,發郵件給須要的人git
如何使用github
修改config目錄下的production.jsonjson
{ "log": { "level": "DEBUG" }, "mail": { "from": "company@xxx.com", //郵件發送人 "mailTo": "di.mu@xxx.com", //郵件接收人 "host":"smtp.xxx.com", "port":25, "secure":false, "user":"company@xxx.com", //程序使用的郵件 "pass":"程序使用的郵件的密碼" }, "imgCode":{ "key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // https://www.juhe.cn/docs/api/id/60 識別驗證碼api的key }, "account": [ { "name": "美團xxx店", "username": "賬戶名", "password": "帳戶密碼", "type": "meituan" }, { "name": "餓了麼xxx店", "username": "賬戶名", "password": "帳戶密碼", "type": "eleme" }, { "name": "百度xxx店", "username": "賬戶名", "password": "帳戶密碼", "type": "baidu" } ] }
其中如下配置是程序中使用驗證碼識別的api服務, 美團,百度的商家後臺都須要驗證碼登陸 api服務使用的是聚合數據的驗證碼識別API服務,你須要先 申請聚合數據的帳號,獲得key 填寫到以下配置項中去。api
"imgCode":{ "key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // https://www.juhe.cn/docs/api/id/60 識別驗證碼api的key },
郵件功能須要配置詳細的smtp服務地址、發件人帳號名、密碼、端口、是否使用sslexcel
"mail": { "from": "company@xxx.com", //郵件發送人 "mailTo": "di.mu@xxx.com", //郵件接收人 "host":"smtp.xxx.com", "port":25, "secure":false, "user":"company@xxx.com", //程序使用的郵件 "pass":"程序使用的郵件的密碼" },
GitHub地址:https://github.com/mudiyouyou...code