这是我的代码而我的蜘蛛没有关注链接 我有来自InitSpider的子类
class TestSpider(InitSpider):
name = 'login'
allowed_domains = ['example.com']
start_urls = ['http://www.example.com']
rules = (Rule(SgmlLinkExtractor(allow=('example\.com', 'PostSearch'),restrict_xpaths = "//dd[@class='nextPage']"), callback='parse_items', follow=True),)
def parse_items(self, response):
hxs = HtmlXPathSelector(response)