scrape multiple zip-codes using scrapy

Viewed 24
start_urls=['https://www.bigrentz.com/equipment-rentals']

I am using Scrapy to get the data from this webpage, the thing is there is an option to change the zip-code on this webpage and get rates for other states, how should one do this ? Is it possible to dump a bunch of zip codes as a list to the request function ?

def parse(self, response):
    main = response.xpath('//section//div/a')

    for stuff in main:
        name = stuff.xpath(".//h2/text()").get()
        links = stuff.xpath(".//@href").get()
        if name is not None:
            #if len(name) < 34:
            yield scrapy.Request(
                url=links,
                dont_filter=True,
                callback=self.parse_internal_info,
                meta={'Type': name}
                )
0 Answers
Related