I want to get the links from a page in the hrefor src attributes. I can do:
Elements href = doc.select("[href]");
Elements src = doc.select("[src]");
There is a way to get links that matches the two attributes: Something like:
Elements links = doc.select("[href] OR [src]");
That should work.
Edit: more explanation can be found in the online cookbook, particularly in the subsection “Selector combinations”
http://jsoup.org/cookbook/extracting-data/selector-syntax