Answer the question
In order to leave comments, you need to log in
How to remove an unnecessary class from the result in the GO parser (more details inside)?
Good afternoon. It is necessary to pull out everything from the div with the class vacancy-post
, except for the h2 with the class vacancy-page-title
As I understand it, this can be done through RemoveClass("")
, but somehow it does not work.
longDescription = s.Find(".vacancy-post").RemoveClass("vacancy-page-title").Text()
Answer the question
In order to leave comments, you need to log in
No, RemoveClass removes a class from elements, it does not remove elements with that class.
You need a Not() function
longDescription = s.Find(".vacancy-post").Not(".vacancy-page-title").Text()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question