Last active
August 29, 2015 14:07
-
-
Save xream/0d96c891c8b2e69a8bcf to your computer and use it in GitHub Desktop.
查询联通剩余流量
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# npm install zombie | |
Browser = require("zombie") | |
browser = new Browser() | |
browser.visit "http://wap.10010.com/t/logout.htm", -> | |
browser.clickLink "[登录]", -> | |
browser.fill("user_id", "此处填写你的手机号").fill("user_pwd", "此处填写你的服务密码").pressButton "登 录", -> | |
browser.clickLink "上网流量", -> | |
console.log("剩余流量: "+browser.text("span.color-red:nth-child(7)")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/xream/10010/tree/develop