Answers for "How to pass a user defined argument in scrapy spider"

0

How to pass a user defined argument in scrapy spider

class VisualScrapySpider(scrapy.Spider):
    name = 'visualscrapy'

    def __init__(self, category='', **kwargs):
        self.start_urls = [f'http://www.visualscrapy.com/search?query={category}']
        super().__init__(**kwargs)

#scrapy crawl visualscrapy -a category=<search_parameter>
Posted by: Guest on December-16-2020

Code answers related to "How to pass a user defined argument in scrapy spider"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language