[sitemap] resolve remaining ScrapyDeprecationWarning exceptions

* SgmlLinkExtractor is deprecated
* Module `scrapy.contrib.exporter` is deprecated

Change-Id: Ie3207a537abfd2b75602000fb4fef8f4c1e8ba56
This commit is contained in:
Christian Berendt
2015-10-02 10:07:59 +02:00
parent 013fcd3665
commit 94d69f1868
2 changed files with 4 additions and 4 deletions

View File

@@ -14,10 +14,10 @@ import os
import lxml
import scrapy
from scrapy.contrib import exporter
from scrapy import exporters
class SitemapItemExporter(exporter.XmlItemExporter):
class SitemapItemExporter(exporters.XmlItemExporter):
'''XmlItemExporer with adjusted attributes for the root element.'''
def start_exporting(self):

View File

@@ -15,7 +15,7 @@ import time
import urlparse
from generator import items
from scrapy.linkextractors import sgml
from scrapy.linkextractors import LinkExtractor
from scrapy import spiders
@@ -24,7 +24,7 @@ class SitemapSpider(spiders.CrawlSpider):
rules = [
spiders.Rule(
sgml.SgmlLinkExtractor(
LinkExtractor(
allow=[
r'.*\.html',
r'.*\.pdf',