我试图使用HTML解析器 http://easyhtmlparser.sourceforge.net/我如何使用easyhtmlparser从python的html文件中获取所有链接?
fd = open('file.html', 'r')
data = fd.read()
fd.close()
html = Html()
dom = html.feed(data)
for ind in dom.sail():
if ind.name == 'a':
print ind.attr['ref']
你嫁给了easyhtmlparser吗?美丽的汤是我的英雄。 – vroomfondel