我正在尝试让SgmlLinkExtractor工作。这是签名:SgmlLinkExtractor(allow=(),deny=(),allow_domains=(),deny_domains=(),restrict_xpaths(),tags=('a','area'),attrs=('href'),canonicalize=True,unique=True,process_value=None)我只是在使用allow=()所以,我输入rules=(Rule(SgmlLinkExtractor(allow=("/aadler/",)),callback='parse'),)所以,初始ur
请看thisspiderexample在Scrapy文档中。解释是:Thisspiderwouldstartcrawlingexample.com’shomepage,collectingcategorylinks,anditemlinks,parsingthelatterwiththeparse_itemmethod.Foreachitemresponse,somedatawillbeextractedfromtheHTMLusingXPath,andaItemwillbefilledwithit.我完全复制了同一个蜘蛛,并用另一个初始url替换了“example.com”。from