Answer the question
In order to leave comments, you need to log in
Parse HTML tag when tag id changes?
Hello everyone, the question is that there is a "comment-id-******" tag, and instead of asterisks, the id of the comment, so I need to parse all the comments, I won't write for each comment:
PS there are a lot of comments to do it manually do and id are always different.
Element commentElem1 = doc.select(".comment-id-556412");
Element commentElem2 = doc.select(".comment-id-123123");
Element commentElem3 = doc.select(".comment-id-313213");
Answer the question
In order to leave comments, you need to log in
Try this
doc.select("[class^=comment-id]");
[attr^=value], [attr$=value], [attr*=value]: elements with attributes that start with, end with, or contain the value, eg [href*=/path/]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question