1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-03-28 21:16:20 +01:00
tldr/pages/common/scrapy.md
bl-ue 8ebd171d6f
*: fix typos reported by Hunspell (#5848)
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: Seth Falco <seth@falco.fun>
Co-authored-by: Patrice Denis <patricedenis@users.noreply.github.com>
2021-05-20 16:13:41 -04: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}}