Answer the question
In order to leave comments, you need to log in
How can I get the first value?
I'm trying to get the value from the following html:
<div class="new">
<span>
117
</span>
<span class="r">i</span>
</div>
s.HTMLDoc.Find(".new span").Text()
117 i
Answer the question
In order to leave comments, you need to log in
doc.Find(".new span").First().Text()
https://play.golang.org/p/Ti1houS29fJ
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question