Skip to content

Commit

Permalink
Provide an example of start URL hard-coding (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio authored Mar 11, 2024
1 parent 0b133ed commit 097e0d8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/customization/spiders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,24 @@ lower price:
yield product
You can also override existing parameters. For example, to hard-code the start
URL:

.. code-block:: python
from scrapy_spider_metadata import Args
from zyte_spider_templates import EcommerceSpider
from zyte_spider_templates.spiders.ecommerce import EcommerceSpiderParams
class MyParams(EcommerceSpiderParams):
url: str = "https://books.toscrape.com"
class MySpider(EcommerceSpider, Args[MyParams]):
name = "my_spider"
.. _custom-crawl:

Customizing the crawling logic
Expand Down

0 comments on commit 097e0d8

Please sign in to comment.