Scrapy CrawlSpider + Splash: how to follow links through linkextractor?

前端 未结 3 497
忘了有多久
忘了有多久 2021-02-09 10:46

I have the following code that is partially working,

class ThreadSpider(CrawlSpider):
    name = \'thread\'
    allowed_domains = [\'bbs.example.com\']
    star         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-02-09 11:37

    Use below code - Just copy and paste

    restrict_xpaths=('//a[contains(text(), "Next Page")]')
    

    Instead of

    restrict_xpaths=("//a[contains(text(), 'Next Page')]")
    

提交回复
热议问题