This is what the HTML looks like:
detail1 1 detail2 detail3
I need to extract detail2 and detail3.
But using this code, I can only get detail1.
info = data.find("p", class_ = "details").span.text
How do I extract the required items?
Thanks in advance!
In your case, select a more specific element, i.e. select all siblingelements of aelement with class number:
Example
Output
You can find all
and do a normal index:
Output result:
Or use CSS selector:
Output result: