Python 网页抓取 - 无法从网站提取列表

Python Web Scraping - Failed to extract a list from the website

我无法从网站中提取第一列“姓名”。有没有人可以帮忙? Website Screenshot 网址为:https://www.wilsonship.no/our-fleet/fleetlist 非常感谢

from scrapy import Selector
import requests

url = 'https://www.wilsonship.no/our-fleet/fleetlist'
html = requests.get(url).content
sel = Selector(text = html)
shipname = sel.xpath('//tr/td[1]/a/text()').extract()
shipname

它很可能使用 JavaScript 动态写入数据。 您可以使用 Selenium 或 Dryscape 等库来获取数据。

您可能想查看 Web Scraping JavaScritp page with Python. Or, if you insist on using scrapy, look into Selecting dynamically-loaded content