-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
Description
Hello,
I'm in a rather tricky situation because after numerous unsuccessful attempts and searches, I'm unable to retrieve the following element, which seems quite trivial. I'm trying to retrieve the string "2h43", but it doesn't seem to belong to any nodes. I've tried testing the outerHTML and the different siblings, but to no avail.
let html = "<strong><u>Durée</u> : </strong>02h43<br>"
Here's my line that should work:
let element: Element = try doc.select("strong:contains(Durée)").first()!
let durationText = try element.nextElementSibling()!.text()