0

I'm having problem with scraping a URL with 'ö', so I found a possible solution here (implemented below)

String url = "https://www.ariva.de/deutsche_börse-aktie/bilanz-guv?page=0";
    String encodedURL = URI.create(url).toASCIIString();
    Document doc = Jsoup.connect(encodedURL).get();

However, I still get the error:

Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=404, URL=http://www.ariva.de/deutsche_b%2525C3%2525B6rse-aktie/bilanz-guv?page=0
Community
  • 1
  • 1

1 Answers1

0

Jsoup.connect(url) automatically encodes the provided URL, just place your url String directly there.

Maximosaic
  • 604
  • 6
  • 14