Scrapy, a fast high-level web crawling & scraping framework for Python.
Modified Unquote adaptor to make use of the new unquote_markup function instead of remove_entities
elpolilla70af2e8e1d00
diff --git a/scrapy/trunk/scrapy/contrib/adaptors/markup.py b/scrapy/trunk/scrapy/contrib/adaptors/markup.pyindex dab57c8d1..3964bc872 100644--- a/scrapy/trunk/scrapy/contrib/adaptors/markup.py+++ b/scrapy/trunk/scrapy/contrib/adaptors/markup.py@@ -1,5 +1,5 @@import re-from scrapy.utils.markup import replace_tags, remove_entities+from scrapy.utils.markup import replace_tags, unquote_markupfrom scrapy.item.adaptors import adaptizedef remove_tags(value):@@ -29,8 +29,8 @@ def remove_root(value):class Unquote(object):"""Receives a list of strings, removes all of the- entities the strings may have, and returns- a new list+ CDATAs and entities (except the ones in CDATAs) the strings+ may have, and returns a new list.Input: iterable with stringsOutput: list of strings@@ -41,4 +41,4 @@ class Unquote(object):def __call__(self, value, keep=None):if keep is not None:self.keep = keep- return [ remove_entities(v, keep=self.keep) for v in value ]+ return [ unquote_markup(v, keep=self.keep) for v in value ]