网页爬虫 - 关于python beautifullsoup解析网页内容丢失的问题?
黄舟
黄舟 2017-04-18 10:18:51
0
2
730

待解析页面的部分代码如第一幅图所示,我自己写的代码及运行结果如第二幅图所示。看到已经有答主提问解析页面丢失是因为用的是lxml的解析方式,我想说我一直用的是html.parser的方式。希望各位大神不吝赐教~

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
左手右手慢动作

Have you never considered dynamic loading with javascript?

伊谢尔伦

Tips, if you use Chrome F12 to view it, there will be dynamically loaded content, and you cannot get this content by directly requesting the URL of the page. It is recommended that you right-click to view the source code of the web page and compare it with the content in F12. If there is no content in the source code, check other requests in the Network to see if there is any data you need.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!