how do i use jsoup to parse internal and external hyperlinks closed

You can try Document.getElementsByAttributeValueMatching() method to find element by attribute name and attribute value with proper regex.

For example, find all elements have attribute name is “href” and attribute value starting with

    Document document = Jsoup.connect("").get();
    Elements elements = document.getElementsByAttributeValueMatching("href", "^");

    for (Element element : elements) {

There are also some similar methods:


CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top