1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 04:02:09 +02:00
tldr/pages/common/scrapy.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

732 B

scrapy

Web-crawling framework. More information: https://scrapy.org.

  • Create a project:

scrapy startproject {{project_name}}

  • Create a spider (in project directory):

scrapy genspider {{spider_name}} {{website_domain}}

  • Edit spider (in project directory):

scrapy edit {{spider_name}}

  • Run spider (in project directory):

scrapy crawl {{spider_name}}

  • Fetch a webpage as scrapy sees it and print source in stdout:

scrapy fetch {{url}}

  • Open a webpage in the default browser as scrapy sees it (disable javascript for extra fidelity):

scrapy view {{url}}

  • Open scrapy shell for url, which allows interaction with the page source in python shell (or ipython if available):

scrapy shell {{url}}