There are 547 nodes for that simple xpath query. The HXS wrapper
is slower than raw api calls when there are many nodes selected.
If you wan to select just first element, but seems unlikely, you can use
this xpath: //div[@class="thumb"]/a[1]
If you want to extract links in order to crawl them, use the link extractor
which is faster in this case:
$ scrapy shell url
...
>>> from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
>>> lx = SgmlLinkExtractor(restrict_xpaths='//div[@class="thumb"]')
>>> ret = lx.extract_links(response)
Regards,
~Rolando
> --
> You received this message because you are subscribed to the Google Groups "scrapy-users" group.
> To post to this group, send email to scrapy...@googlegroups.com.
> To unsubscribe from this group, send email to scrapy-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/scrapy-users?hl=en.
>
>