有什么办法升级网络爬虫吗?

时间:2020-09-02 22:10:13

标签: python web-scraping

我正在抓取一个网站,但是花太多时间才能逐行进行迭代。有什么方法可以重复读取整个表吗?

这是我的代码:

<import namespace="http://ws-i.org/profiles/basic/1.1/xsd"/>

这是我要从中删除的网站: https://fnet.bmfbovespa.com.br/fnet/publico/abrirGerenciadorDocumentosCVM

2 个答案:

答案 0 :(得分:1)

您已经有table作为变量。您无需使用驱动程序来进一步查找每一行。

例如,您可以使用BeautifulSoup来解析表文本

答案 1 :(得分:1)

您可以从表格中创建熊猫数据框

t = driver.find_element_by_xpath("//table[@id='tblDocumentosEnviados']").get_attribute('outerHTML')
table_df = pd.read_html(t)