deanthompson / zhihu-go Goto Github PK
View Code? Open in Web Editor NEW知乎非官方 API 库 Go 实现版本,获取知乎内容信息,包括问题,答案,用户,收藏夹等信息
License: MIT License
知乎非官方 API 库 Go 实现版本,获取知乎内容信息,包括问题,答案,用户,收藏夹等信息
License: MIT License
the doc.Find("div#zh-question-detail") result is empty which due to the zhihu's front page changed, so how the "div#zh-question-detail" comes,why i didn't find the zh-question-detail div in the front page,and i didn't find the similar div name
reCollectionURL = regexp.MustCompile("^(http|https)://www.zhihu.com/collection/[0-9]{8}$")
URL: https://www.zhihu.com/collection/39752212
URL: https://www.zhihu.com/collection/19701180
URL: https://www.zhihu.com/collection/20067792
URL: https://www.zhihu.com/collection/74578659
URL: https://www.zhihu.com/collection/123760119 # 此为私有收藏夹
panic: 收藏夹链接不正确:https://www.zhihu.com/collection/123760119
新建了 config.json,增加了登陆信息,运行时,输出了登陆成功,但没有成功执行。报错信息:
NFO: GET https://www.zhihu.com/settings/profile
INFO: 获取 profile 的请求,跳转到了:https://www.zhihu.com/?next=%2Fsettings%2Fprofile
INFO: 登录类型:email, 登录地址:https://www.zhihu.com/login/email
INFO: GET https://www.zhihu.com
INFO: 获取验证码:https://www.zhihu.com/captcha.gif?r=1482506116000&type=login
INFO: GET https://www.zhihu.com/captcha.gif?r=1482506116000&type=login
INFO: 调用外部程序渲染验证码……
INFO: Command: open /Users/Frank/src/github.com/DeanThompson/zhihu-go/examples/verify.gif
请输入验证码:vuyx
INFO: 登录中,用户名:**********@hotmail.com
INFO: 登录响应内容:{"r":0, "msg": "\u767b\u5f55\u6210\u529f"}
SUCCESS: 登录成功!
INFO: User fields:
INFO: is anonymous: false
INFO: GET https://www.zhihu.com/people/jixin
INFO: userId:
panic: interface conversion: interface is nil, not string
goroutine 1 [running]:
panic(0x2a5f00, 0xc4202a5400)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/DeanThompson/zhihu-go.(*User).GetDataID(0xc4203edc20, 0x2f7589, 0xb)
/Users/myname/src/github.com/DeanThompson/zhihu-go/user.go:85 +0x3db
main.showUser(0xc4203edc20)
/Users/myname/src/github.com/DeanThompson/zhihu-go/examples/example.go:164 +0x231
main.main()
/Users/myname/src/github.com/DeanThompson/zhihu-go/examples/example.go:19 +0x81
exit status 2
golang 版本:
go version go1.7.3 darwin/amd64
这种问题请问该怎么解决?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.