Jacky's blog
首页
  • 学习笔记

    • web
    • android
    • iOS
    • vue
  • 分类
  • 标签
  • 归档
收藏
  • tool
  • algo
  • python
  • java
  • server
  • growth
  • frida
  • blog
  • SP
  • more
GitHub (opens new window)

Jack Yang

编程; 随笔
首页
  • 学习笔记

    • web
    • android
    • iOS
    • vue
  • 分类
  • 标签
  • 归档
收藏
  • tool
  • algo
  • python
  • java
  • server
  • growth
  • frida
  • blog
  • SP
  • more
GitHub (opens new window)
  • python 学习指南
  • python 中的设计模式
  • module

  • tool

  • other

    • scrapy shell
      • common
      • configuration
      • ipython 安装
      • skill
      • link
    • xpath
    • ipython
    • pyproject_toml文件
    • python中的反射
    • 统计学数学概念整理
    • setuptools打包与安装
    • 日志分析工具
  • 《python》
  • other
Jacky
2024-04-29
目录

scrapy shell

see, scrapy

# common

  • fetch(url)
  • shelp()
  • help(<response>): help about response
[s] Available Scrapy objects:
[s]   scrapy     scrapy module (contains scrapy.Request, scrapy.Selector, etc)
[s]   Out        {2: <200 https://docs.scrapy.org/en/latest/topics/shell.html>, 3: Type help() for interactive help, or help(object) for help about object., 5: True, 7: [<Selector query='//h2' data='<h2>Configuring the shell<a class="he...'>, <Selector query='//h2' data='<h2>Launch the shell<a class="headerl...'>, <Selector query='//h2' data='<h2>Using the shell<a class="headerli...'>, <Selector query='//h2' data='<h2>Example of shell session<a class=...'>, <Selector query='//h2' data='<h2>Invoking the shell from spiders t...'>], 8: [<Selector query='//h2/text()' data='Configuring the shell'>, <Selector query='//h2/text()' data='Launch the shell'>, <Selector query='//h2/text()' data='Using the shell'>, <Selector query='//h2/text()' data='Example of shell session'>, <Selector query='//h2/text()' data='Invoking the shell from spiders to in...'>]}
[s]   _2         <200 https://docs.scrapy.org/en/latest/topics/shell.html>
[s]   _oh        {2: <200 https://docs.scrapy.org/en/latest/topics/shell.html>, 3: Type help() for interactive help, or help(object) for help about object., 5: True, 7: [<Selector query='//h2' data='<h2>Configuring the shell<a class="he...'>, <Selector query='//h2' data='<h2>Launch the shell<a class="headerl...'>, <Selector query='//h2' data='<h2>Using the shell<a class="headerli...'>, <Selector query='//h2' data='<h2>Example of shell session<a class=...'>, <Selector query='//h2' data='<h2>Invoking the shell from spiders t...'>], 8: [<Selector query='//h2/text()' data='Configuring the shell'>, <Selector query='//h2/text()' data='Launch the shell'>, <Selector query='//h2/text()' data='Using the shell'>, <Selector query='//h2/text()' data='Example of shell session'>, <Selector query='//h2/text()' data='Invoking the shell from spiders to in...'>]}
[s]   crawler    <scrapy.crawler.Crawler object at 0x10eaf6eb0>
[s]   item       {}
[s]   request    <GET https://docs.scrapy.org/en/latest/topics/shell.html#topics-shell>
[s]   response   <200 https://docs.scrapy.org/en/latest/topics/shell.html>
[s]   settings   <scrapy.settings.Settings object at 0x10eb2f160>
[s]   spider     <DefaultSpider 'default' at 0x11092a3d0>
[s] Useful shortcuts:
[s]   fetch(url[, redirect=True]) Fetch URL and update local objects (by default, redirects are followed)
[s]   fetch(req)                  Fetch a scrapy.Request and update local objects
[s]   shelp()           Shell help (print this help)
[s]   view(response)    View response in a browser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# configuration

Scrapy will look for configuration parameters in ini-style scrapy.cfg files in standard locations:

  • /etc/scrapy.cfg or c:\scrapy\scrapy.cfg (system-wide),
  • ~/.config/scrapy.cfg ($XDG_CONFIG_HOME) and ~/.scrapy.cfg ($HOME) for global (user-wide) settings, and
  • scrapy.cfg inside a Scrapy project’s root (see next section).

# ipython 安装

  • pip3 install ipython
  • scrapy shell: launch

# skill

  • play with splash: jump

# link

  • topics-shell (opens new window)
上次更新: 2024/12/12, 17:52:31
pyenv 好用的python版本管理工具
xpath

← pyenv 好用的python版本管理工具 xpath→

最近更新
01
npx 使用指南
10-12
02
cursor
09-28
03
inspect
07-20
更多文章>
Theme by Vdoing | Copyright © 2019-2025 Jacky | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式