selectors: no need to pass encoding on re() method

This commit is contained in:
Pablo Hoffman 2010-10-27 05:53:46 -02:00
parent bd7def8fd4
commit 9c9a655cb4
2 changed files with 2 additions and 2 deletions

View File

@ -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"""

View File

@ -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: