Когда я собираю ссылки так:
urls = lxml.html.fromstring(html)
urls = urls.xpath(u'//img/ancestor::a[not(re:match(@href, "(slovo)")) ]/@href', namespaces={"re": "http://exslt.org/regular-expressions"})
print urls
Выводится список ссылок.
В таком случае:
test = lxml.html.fromstring(html)
test = test.xpath('//s@[class="test"]')
print test
Отдает вот это:
[<Element s at 18034c8>, <Element s at 1803530>, <Element s at 1803598>, <Element s at 1803600>, <Element s at 1803668>, <Element s at 18036d0>, <Element s at 1803738>, <Element s at 18037a0>, <Element s at 1803808>, <Element s at 1803870>, <Element s at 18038d8>, <Element s at 1803940>, <Element s at 18039a8>, <Element s at 1803a10>, <Element s at 1803a78>, <Element s at 1803ae0>, <Element s at 1803b48>, <Element s at 1803bb0>, <Element s at 1803c18>, <Element s at 1803c80>]
Не понимаю в чем разница, и что делать с таким списком во втором случае.