title: Scrapy ignore noindex
body: <p>I am crawling a large number of URLs and was wondering if it possible to have scrapy not parse pages with 'meta name="robots" content="noindex"'?
  Looking at the deny rules listed here <a href="http://doc.scrapy.org/en/latest/topics/link-extractors.html" rel="nofollow">http://doc.scrapy.org/en/latest/topics/link-extractors.html</a> it looks like the deny rules only apply to URLs.  Can you have scrapy ignore a xpath?</p>
  
  <pre><code>from scrapy.selector import HtmlXPathSelector
  from scrapy.contrib.spiders import CrawlSpider, Rule
  from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
  
  from wallspider.items import Website
  
  
  class Spider(CrawlSpider):
      name = "browsetest"
      allowed_domains = ["www.mydomain.com"]
      start_urls = ["http://www.mydomain.com",]
  
      rules = (
          Rule(SgmlLinkExtractor(allow=('/browse/')), callback="parse_items", follow= True),
          Rule(SgmlLinkExtractor(allow=(),unique=True,deny=('/[1-9]$', '(bti=)[1-9]+(?:\.[1-9]*)?', '(sort_by=)[a-zA-Z]', '(sort_by=)[1-9]+(?:\.[1-9]*)?', '(ic=32_)[1-9]+(?:\.[1-9]*)?', '(ic=60_)[0-9]+(?:\.[0-9]*)?', '(search_sort=)[1-9]+(?:\.[1-9]*)?', 'browse-ng.do\?', '/page/', '/ip/', 'out\+value', 'fn=', 'customer_rating', 'special_offers', 'search_sort=&amp;', 'facet=' ))),
      )
  
      def parse_items(self, response):
          hxs = HtmlXPathSelector(response)
          sites = hxs.select('//html')
          items = []
  
          for site in sites:
              item = Website()
              item['url'] = response.url
              item['canonical'] = site.xpath('//head/link[@rel="canonical"]/@href').extract()
              item['robots'] = site.select('//meta[@name="robots"]/@content').extract()
              items.append(item)
  
          return items
  </code></pre>