【发布时间】:2014-03-27 03:28:31
【问题描述】:
我发现 lxml 无法解析 iframe 的 heml 元素。
import lxml.html
from urllib.request import urlopen
import os
url="http://news.163.com/special/mhmingdan/?bdsj"
file=urlopen(url).read()
root=lxml.html.document_fromstring(file)
tab=root.xpath('//iframe')
如何让lxml获取iframe的html元素?
【问题讨论】:
标签: python html web-scraping lxml lxml.html