Clean imports in code
In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. [1]: "Do not import objects, only modules". [1] https://docs.openstack.org/hacking/0.10.3/ Change-Id: I49452e41f9674e6ebfcc1577d59d21750e957677
This commit is contained in:
parent
675f242c30
commit
8625096bce
@ -18,7 +18,7 @@ except ImportError:
|
||||
import urllib.parse as urlparse
|
||||
|
||||
from scrapy import item
|
||||
from scrapy.linkextractors import LinkExtractor
|
||||
from scrapy import linkextractors
|
||||
from scrapy import spiders
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ class SitemapSpider(spiders.CrawlSpider):
|
||||
|
||||
rules = [
|
||||
spiders.Rule(
|
||||
LinkExtractor(
|
||||
linkextractors.LinkExtractor(
|
||||
allow=[
|
||||
r'.*\.html',
|
||||
r'.*\.pdf',
|
||||
|
Loading…
Reference in New Issue
Block a user