tgbot-collection / ExpressBot

一个可以帮你订阅、查询快递物流、跟你闲聊Telegram机器人
https://www.bennythink.com/expressbot.html
GNU General Public License v2.0
157 stars 40 forks source link

Providing alternative options for users and new platform recommendation #8

Closed ann61c closed 4 years ago

ann61c commented 5 years ago
  1. Sometimes the ExpressBot provides wrong information due to the incorrect selection of express company. The bot could provide alternative option when users notice that the information provided is obviously wrong. (eg. when I am tracking my domestic package, the bot said the package is on the way to Tokyo, which is impossible.)

  2. 17track is wonderful. You may try this one instead of kuaidi100

Makiras commented 5 years ago

快递鸟有一个看上去很成熟的Python lib了,如果让用户自行部署的话,每天3000的API量,每5min查询一次能支撑10单。(而且写起来应该也比较方便?)

BennyThink commented 5 years ago

@Makiras 看起来这个库还不错,不知道获取快递鸟的API Key是否会比较麻烦,如果比较简单的话,可以看看更换为它,当然有个PR更好了

Makiras commented 5 years ago

我正在用selenium尝试做m.kuaidi100.com的页面模拟爬取,速度可能比较慢,但是支持顺丰 不过因为996所以可能还需要半个月(如果需要的话)到那时候再提PR 不过这样就要求有Firefox前置用于headless模式的爬取..

BennyThink commented 5 years ago

Excellent! @Makiras

Makiras commented 5 years ago

@BennyThink 爬取工具,不过因为是模拟爬取所以开启时可能比较耗资源,目前我的测试中还没碰到需要验证码的地方,最近比较忙所以PR就咕咕咕了。能爬顺丰,大佬有时间适配一下吧。

BennyThink commented 5 years ago

用selenium的话,那其实很重量级了,还要有webdriver,比如phantomjs或者headless Chrome…

Makiras notifications@github.com于2019年8月23日 周五下午7:54写道:

@BennyThink https://github.com/BennyThink 爬取工具 https://github.com/Makiras/selenium_kuaidi100 ,不过因为是模拟爬取所以开启时可能比较耗资源,目前我的测试中还没碰到需要验证码的地方

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/BennyThink/ExpressBot/issues/8?email_source=notifications&email_token=ADLABAAKHVB4LNLRI4GIW73QF7FXPA5CNFSM4HFXESN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4772ZY#issuecomment-524287335, or mute the thread https://github.com/notifications/unsubscribe-auth/ADLABACLYUBTWCNQXJRCTJLQF7FXPANCNFSM4HFXESNQ .

-- -Talk is always cheaper than code.

Makiras commented 5 years ago

我是用firefox的headless实现的,峰值内存占用能控制在100m,cpu会在初始化浏览器时跑满,但请求页面没啥太大变化。似乎也不是太重量? (其实是需要一个firefox + driver(6m)) 如果是每个人部署在各自的机子上似乎也不是不能接受?毕竟浏览器只在查询的时候占用资源,其他时候都是关闭状态

BennyThink commented 5 years ago

100M内存很珍贵了😂🤓

Makiras notifications@github.com于2019年8月24日 周六上午2:27写道:

我是用firefox的headless实现的,峰值内存占用能控制在100m,cpu会在初始化浏览器时跑满,但请求页面没啥太大变化。似乎也不是太重量? (其实是需要一个firefox + driver(6m)) 如果是每个人部署在各自的机子上似乎也不是不能接受?毕竟浏览器只在查询的时候占用资源,其他时候都是关闭状态

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BennyThink/ExpressBot/issues/8?email_source=notifications&email_token=ADLABACRKN7CTLMSI55BXVTQGATXRA5CNFSM4HFXESN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5A7KQA#issuecomment-524416320, or mute the thread https://github.com/notifications/unsubscribe-auth/ADLABAAFPOSQBHXRMX2A773QGATXRANCNFSM4HFXESNQ .

-- -Talk is always cheaper than code.

Makiras commented 5 years ago

(:з」∠),我再试试用execujs做下,因为做的反爬比较恼人orz