美文网首页
Scrapy commands

Scrapy commands

作者: 方方块 | 来源:发表于2017-07-18 02:36 被阅读0次

.extract() - list of items
.extract_first() - the string converted from unicode ('u')
response.urljoin(relative url) - make absolute url
scrapy.htttp.request or selector.follow - simulate clicking onto next page, follow allows relative path

xpath

  • contains
xpath('//*[contains(@class, "star-rating")]/@class')
  • following-sibling::
xpath(''//*[@id="product_description"]/following-sibling::p/text()'')

相关文章

网友评论

      本文标题:Scrapy commands

      本文链接:https://www.haomeiwen.com/subject/iylckxtx.html