You can "clean" parsed Document, see example. For exammple, to left only simple text:
Whitelist whitelist = Whitelist.simpleText(); String result = Jsoup.clean(doc.html(), whitelist);
Or, you can simple delete all a
tags:
doc.select("a").remove();
Read full article from java - Omit links, ads, etc. from jsoup parse - Stack Overflow
No comments:
Post a Comment