![](/img/trans.png)
[英]Trying to extract data using python/scrapy and not able to find the correct xpath
[英]Using Scrapy Python not able to extract data from response html with xpath due to namespace
命名空間是真的嗎? 使用 css 的另一個原因:
response.css('a#jr-alt-sw::attr(href)')
此處選擇的a
標簽沒有可用的href
屬性,請查看下a
包含href
屬性的a
標簽。
response.xpath('//a[@id="jr-pdf-sw"]/@href')
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.