Browse Source

[sitemap] resolve several ScrapyDeprecationWarning exceptions

Change-Id: Ie87e6c316eecd45006332088912b31809b4c9679
tags/0.30.1
Christian Berendt 4 years ago
parent
commit
8a2df7b6ef
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      sitemap/generator/settings.py
  2. +2
    -2
      sitemap/generator/spiders/sitemap.py

+ 2
- 2
sitemap/generator/settings.py View File

@@ -16,7 +16,7 @@
# All available configuration variables are documente at # All available configuration variables are documente at
# http://doc.scrapy.org/en/latest/topics/settings.html. # http://doc.scrapy.org/en/latest/topics/settings.html.


from scrapy import linkextractor
from scrapy import linkextractors


BOT_NAME = 'sitemap' BOT_NAME = 'sitemap'
SPIDER_MODULES = ['generator.spiders'] SPIDER_MODULES = ['generator.spiders']
@@ -31,4 +31,4 @@ LOG_LEVEL = 'INFO'
LOGGING_ENABLED = True LOGGING_ENABLED = True
RANDOMIZE_DOWNLOAD_DELAY = False RANDOMIZE_DOWNLOAD_DELAY = False
TELNETCONSOLE_ENABLED = False TELNETCONSOLE_ENABLED = False
linkextractor.IGNORED_EXTENSIONS.remove('pdf')
linkextractors.IGNORED_EXTENSIONS.remove('pdf')

+ 2
- 2
sitemap/generator/spiders/sitemap.py View File

@@ -15,8 +15,8 @@ import time
import urlparse import urlparse


from generator import items from generator import items
from scrapy.contrib.linkextractors import sgml
from scrapy.contrib import spiders
from scrapy.linkextractors import sgml
from scrapy import spiders




class SitemapSpider(spiders.CrawlSpider): class SitemapSpider(spiders.CrawlSpider):


Loading…
Cancel
Save