擅长:python、mysql、java
<p>您提供的链接中不存在id recommendationTable。
您是否尝试通过将类名传递给xpath来获取表</p>
<pre><code> table = driver.find_element_by_xpath("//table[@class='marketInfo']")
with open('scraper.csv', 'w', newline='') as csvfile:
wr = csv.writer(csvfile)
for row in table.find_elements_by_xpath('.//tbody/tr'):
wr.writerow([d.text for d in row.find_elements_by_xpath('.//td')])
</code></pre>