How to get two attributes of the same HTML class with JSOUP - JAVA

0
I'm getting content from an HTML page, so I'm selecting content for a specific class, but in case that class has content with a href and span , I can only get one.

Document doc = Jsoup.connect("https://www.sinonimos.com.br/"+texto+"/" ).get();   
Elements classHTML = doc.getElementsByClass("sinonimos").select("a[href]");

How would I filter to get span too?

    
asked by anonymous 09.12.2017 / 20:38

0 answers