From 382621b814ca149f8cecf7c082e421978601349c Mon Sep 17 00:00:00 2001 From: elpolilla Date: Wed, 7 Jan 2009 17:39:09 +0000 Subject: [PATCH] Fixed bug in RegexLinkExtractor. Encoding was not being specified --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40677 --- scrapy/trunk/scrapy/link/extractors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapy/trunk/scrapy/link/extractors.py b/scrapy/trunk/scrapy/link/extractors.py index 8ee90f86f..7dbf317d9 100644 --- a/scrapy/trunk/scrapy/link/extractors.py +++ b/scrapy/trunk/scrapy/link/extractors.py @@ -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)