在项目目录下  cmd——>scrapy shell http://www.wxapp-union.com/article-5602-1.html

scrapy 测试工具scrapy shell

输入

title = response.xpath("//h1[@class='ph']/text()").get()

print(title)

scrapy 测试工具scrapy shell

跟pycharm 项目里是一样的用法

相关文章:

  • 2021-06-13
  • 2022-03-10
  • 2021-07-10
  • 2021-11-05
  • 2022-02-17
  • 2022-03-04
  • 2022-02-16
  • 2021-06-21
猜你喜欢
  • 2022-01-08
  • 2021-06-09
  • 2021-06-08
  • 2022-03-07
  • 2021-11-03
  • 2022-12-23
相关资源
相似解决方案