我想爬取一个固定网站中sitemap.xml中存在的所有链接。我已经找到了Scrapy的SitemapSpider。到目前为止,我已经提取了sitemap中的所有url。现在我想遍历每个链接。任何帮助都将非常有用。到目前为止的代码是:
class MySpider(SitemapSpider):
name = "xyz"
allowed_domains = ["xyz.nl"]
sitemap_urls = ["http://www.xyz.nl/sitemap.xml"]
def parse(self, response):
print response.url