我正在尝试基于 WhatsApp 的 Web 应用程序创建一个程序。我试图找出启动此类程序的最佳编程语言。例如,我已经用 java 试过了,但是用这个实现:
public UrlReader() throws IOException {
try {
URL whatsApp = new URL("https://web.whatsapp.com/");
DataInputStream dis = new DataInputStream(whatsApp.openStream());
String inputLine;
while ((inputLine = dis.readLine()) != null) {
System.out.println(inputLine);
}
dis.close();
} catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
} catch (IOException ioe) {
System.out.println("IOException: " + ioe);
}
}
这只是来自 oracle 网站的基本复制和粘贴。这个程序的输出是一个网站,告诉我我必须使用像 chrome 这样的浏览器。有没有更好的方法来创建这样的程序?