This is my code and my spider is not following links I have sub class from 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)
- am using this example https://stackoverflow.com/a/5857202/1894766*