mirror of https://github.com/scrapy/scrapy.git
Removed an out-of-scrapy reference in the BasicSpider
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40358
This commit is contained in:
parent
bc13a5924a
commit
1a45754cf2
|
|
@ -6,6 +6,7 @@ and XML feeds (XMLFeedSpider).
|
|||
from scrapy.http import Request, Response, ResponseBody
|
||||
from scrapy.spider import BaseSpider
|
||||
from scrapy.item import ScrapedItem
|
||||
from scrapy.xml.selector import XmlXPathSelector
|
||||
from scrapy.core.exceptions import UsageError
|
||||
from scrapy.utils.misc import hash_values
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class BasicSpider(BaseSpider):
|
|||
This class is basically a BaseSpider with support for GUID generating
|
||||
"""
|
||||
gen_guid_attribs = []
|
||||
gen_variant_guid_attribs = []
|
||||
|
||||
def set_guid(self, item):
|
||||
item.guid = hash_values(*[str(getattr(item, aname) or '') for aname in self.gen_guid_attribs])
|
||||
|
|
@ -100,7 +100,7 @@ class XMLFeedSpider(BasicSpider):
|
|||
if self.iternodes:
|
||||
nodes = xpathselector_iternodes(response, self.itertag)
|
||||
else:
|
||||
nodes = HtmlXPathSelector(response).x('//%s' % self.itertag)
|
||||
nodes = XmlXPathSelector(response).x('//%s' % self.itertag)
|
||||
|
||||
return (self.parse_item(response, xSel) for xSel in nodes)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue