mirror of https://github.com/scrapy/scrapy.git
selectors: no need to pass encoding on re() method
This commit is contained in:
parent
bd7def8fd4
commit
9c9a655cb4
|
|
@ -54,7 +54,7 @@ class XPathSelector(object_ref):
|
|||
def re(self, regex):
|
||||
"""Return a list of unicode strings by applying the regex over all
|
||||
current XPath selections, and flattening the results"""
|
||||
return extract_regex(regex, self.extract(), 'utf-8')
|
||||
return extract_regex(regex, self.extract())
|
||||
|
||||
def extract(self):
|
||||
"""Return a unicode string of the content referenced by the XPathSelector"""
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class XPathSelector(object_ref):
|
|||
return XPathSelectorList(result)
|
||||
|
||||
def re(self, regex):
|
||||
return extract_regex(regex, self.extract(), 'utf-8')
|
||||
return extract_regex(regex, self.extract())
|
||||
|
||||
def extract(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in New Issue