基本上我想访问html表中的元素。你知道吗
这是我的密码:
r = requests.get('http://www.google.com/finance?q=NYSE%3Aibm&ei=Hz4oVZq-PISjiQKYu4GoAQ')
soup = BeautifulSoup(r.content)
td = soup.find_all('td', class_='ctsymbol')
我什么都得不到…[]
我在同一个td上尝试了这种方法,但这次是在本地文本文件上,似乎效果不错。
我做错什么了?你知道吗
Tags:
页面中根本没有这样的元素:
这是在所服务的HTML中
<td>
元素上使用的所有类的集合。考虑到您不能依赖浏览器开发工具中的元素树,因为它们反映了JavaScript代码运行后的页面。你知道吗相关问题 更多 >
编程相关推荐