Closed vash-knives closed 1 week ago
You can get away with css selectors here:
parser = HTMLParser(html)
for item in parser.css('td.no_cell a'):
print(item.text, item.attributes)
@rushter , nice that worked. what's the best way to grab the text on the same level (Sun, 16 June 2024, 20:51:11
). i only see it when i do ...text(deep=True)
@rushter , nice that worked. what's the best way to grab the text on the same level (
Sun, 16 June 2024, 20:51:11
). i only see it when i do...text(deep=True)
Just do item.next.text()
for the first a
tag you got from css selector.
Hi there,
Can we get examples when / how to use
.next
,.prev
? And say in adiv
you have 2a
tags that does not have any classes and have texts in between them. What's the best way to grab things?eg.
Thanks