The page turning links of the website are all displayed as one-sharp. Can you still use crawl spider?

http://house.njhouse.com.cn/r.
website flip links are displayed as a-sharp, can you still use crawl spider?

how to write the rules of this site if it works.
I wrote this unworkable amount

rules = [
Rule (LinkExtractor (allow= ("/ rent/houselist/p-d+",)), callback="parse_item", follow=True),

]



here is the main code of my crawler, how to modify it.

class ListSpider (CrawlSpider):

-sharp 
name = "nanjingtenement"
-sharp 
allowed_domains = ["njhouse.com.cn"]
-sharp URL
start_urls = ["http://house.njhouse.com.cn/rent/houselist/p-1"
]
rules = [
    Rule(LinkExtractor(allow=(r"/rent/houselist/p-"+ "\d+" ,)),callback="parse_item", follow=True),
]
-sharp 
def parse_item(self, response):
    for sel in response.xpath("//div[@class="list_main_lists"]/ul/li[not(@id)]"):
        item = NanjingItem()
        link = sel.xpath("a/@href")[0].extract()
        item["link"] = link
        pageno=response.selector.xpath("//div[@class="pagination-container"]/a[@class="active btn-active-filter"]/text()")[0].extract()
        item["pageno"] = pageno
        listingchannel=sel.xpath("div/p/text()")[0].extract()
        item["listingchannel"] = listingchannel
        yield item
Mar.04,2021

just take the data-index. The paging url is http://house.njhouse.com.cn/r.
. Just use the' http://house.njhouse.com.cn/r.' to concatenate the page number.

or

just observe how many page numbers are directly looped out of all the paged url.

Menu