Jaunt hyperlink replacing values with %3F and %3D

875 Views Asked by At

I'm currently retrieving hyperlinks from websites with the Jaunt api provided for Java. The code is as follows:

        for (Element link : UA.doc.findEvery("<h3 class=r>").findEvery("<a>")) {
            String temp = link.getAt("href");
            System.out.println(temp);
        }

The problem is when I visit sites such as the below and print it to the console the ? and the = sign I converted to %3F and %3D.

https://www.bloomberg.com/research/stocks/private/snapshot.asp?privcapId=7991464

I'm sorry if the issue is basic but I can not find anything online concerning the issue. Do you guys think it might be a encoding issue? To summarise I'd like to covert the %3F and %3D into their original form if possible.

Please let me know if you need more info.

1

There are 1 best solutions below

0
On

We can close the topic. It worked when I used the below code:

System.out.println(URLDecoder.decode(link.getAt("href"), "UTF-8"));