
Maybe even easier: string() in the XPATH: === description = tree.xpath('string(//meta[@name="description"]/@content)') print(description) === best, /PA On Fri, 27 May 2022 at 19:03, <codecomplete@free.fr> wrote:
For others' benefit:
======= description = tree.xpath("//meta[@name='description']/@content") print(description[0]) ======= _______________________________________________ lxml - The Python XML Toolkit mailing list -- lxml@python.org To unsubscribe send an email to lxml-leave@python.org https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: paaguti@gmail.com
-- Fragen sind nicht da um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Headaches with a Juju log: unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet