0

I am trying to get web page source code using java

public static void main(String[] args) throws Exception {

    URL oracle = new URL("http://stackoverflow.com/");
    BufferedReader in = new BufferedReader(new InputStreamReader(
            oracle.openStream(), "UTF-8"));

    String inputLine;
    while ((inputLine = in.readLine()) != null)
        System.out.println(inputLine);
    in.close();
}

But the problem is I can only get mobile page, I wanna get the PC page

Please help me, Thanks! XD

1461748123
  • 21
  • 1
  • 4

0 Answers0