The Wayback Machine - https://web.archive.org/web/20200927072817/https://github.com/binux/pyspider/issues/631
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过 response.doc 取文档节点时,数据不全 #631

Open
ljcd opened this issue Jan 23, 2017 · 0 comments
Open

通过 response.doc 取文档节点时,数据不全 #631

ljcd opened this issue Jan 23, 2017 · 0 comments

Comments

@ljcd
Copy link

@ljcd ljcd commented Jan 23, 2017

目标页面:http://cn.made-in-china.com/nEpxPNzdFmlJ-gongsi-15.html
希望通过类似 Jquery 中的 $('.co-name a') 命令获取该页面中的公司列表(一共 30 个公司)
1、通过直接使用 PyQuery 是可以获得完整 30 个公司节点的:

p = PyQuery('http://cn.made-in-china.com/nEpxPNzdFmlJ-gongsi-15.html')
company_list = p('.co-name a')

2、通过 response.doc('.co-name a') 命令只返回了 8 个公司节点。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.