I want to get the code of a website. In this case it's a tiktok page.
My code looks like this:
try {
URL url = new URL("https://www.tiktok.com/@petyyyyyy?lang=de");
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inputLine;
while((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
} catch (MalformedURLException me) {
System.out.println(me);
} catch (IOException ioe) {
System.out.println(ioe);
}
This works perfect for any normal website. The problem is that it doesnt' work with this tiktok site.
I think it's because there is an @ in the URL and Java has a problem with it.
Any help appreciated