mirror of https://github.com/scrapy/scrapy.git
Fixed bug in RegexLinkExtractor. Encoding was not being specified
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40677
This commit is contained in:
parent
307f8b3321
commit
382621b814
|
|
@ -55,7 +55,7 @@ class RegexLinkExtractor(LinkExtractor):
|
|||
if self.restrict_xpaths:
|
||||
hxs = HtmlXPathSelector(response)
|
||||
html_slice = ''.join(''.join(html_fragm for html_fragm in hxs.x(xpath_expr).extract()) for xpath_expr in self.restrict_xpaths)
|
||||
links = self._extract_links(html_slice, response.url)
|
||||
links = self._extract_links(html_slice, response.url, response.body.get_real_encoding())
|
||||
else:
|
||||
links = LinkExtractor.extract_links(self, response)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue