diff --git a/scrapy/trunk/scrapy/command/commands/scrape.py b/scrapy/trunk/scrapy/command/commands/scrape.py index 563271f52..840c5f0df 100644 --- a/scrapy/trunk/scrapy/command/commands/scrape.py +++ b/scrapy/trunk/scrapy/command/commands/scrape.py @@ -2,7 +2,7 @@ import scrapy from scrapy.command import ScrapyCommand from scrapy.fetcher import fetch from scrapy.spider import spiders -from scrapy.xpath import XPathSelector +from scrapy.xpath import XmlXPathSelector, HtmlXPathSelector from scrapy.utils.misc import load_class from scrapy.extension import extensions from scrapy.conf import settings @@ -14,7 +14,8 @@ def load_url(url, response): vars['item'] = item vars['url'] = url vars['response'] = response - vars['xs'] = XPathSelector(response) + vars['xxs'] = XmlXPathSelector(response) + vars['hxs'] = HtmlXPathSelector(response) vars['spider'] = spiders.fromurl(url) return vars diff --git a/scrapy/trunk/scrapy/xpath/__init__.py b/scrapy/trunk/scrapy/xpath/__init__.py index a221e53a0..e4bd3539a 100644 --- a/scrapy/trunk/scrapy/xpath/__init__.py +++ b/scrapy/trunk/scrapy/xpath/__init__.py @@ -11,5 +11,5 @@ spiders, for convenience. """ from scrapy.xpath.types import XPath -from scrapy.xpath.selector import XPathSelector +from scrapy.xpath.selector import XPathSelector, XmlXPathSelector, HtmlXPathSelector from scrapy.xpath.iterator import XMLNodeIterator