【问题标题】:How to get the Href from the : <a class=''...' href= ''...''> using Scrapy with css selectors如何使用带有 css 选择器的 Scrapy 从 <a class=''...' href= ''...''> 获取 Href
【发布时间】:2021-12-22 06:18:48
【问题描述】:

【问题讨论】:

标签: scrapy


【解决方案1】:
In [1]: response.css('a::attr(href)').get()
Out[1]: '/content/dam/aldi/netherlands/products/nieuw/7089_MIENESTJES_02.png/_jcr_content/renditions/opt.1250w.png.res/1531142854839/opt.1250w.png'

【讨论】:

  • @DanGeorgeBostan 没问题,请采纳答案。
猜你喜欢
  • 2014-02-06
  • 2017-09-27
  • 1970-01-01
  • 1970-01-01
  • 2016-08-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多