Results 1 to 1 of 1
  1. #1
    FunkyProg is offline Member
    Join Date
    Jan 2011
    Rep Power

    Default Page source not the same : getInputStream() vs Ctrl+U

    Hi all!

    I'm using a program to access the page source of a website. I've noticed that the content is not the same as when I do it manually using Ctrl+U in the browser. Some important data are missing in the page source when I use the program, which relies on the getInputStream() method. Do you know why, and how can I fix it?

    Java Code:
    String site = "";
    	URL url = new URL(site);
    	URLConnection connection = url.openConnection();
    	Scanner in = new Scanner(connection.getInputStream());
    		line = in.nextLine();
    		(print line to a file)
    catch(Exception e)
    Many thanks for helping me!

    Last edited by FunkyProg; 03-30-2011 at 06:56 AM. Reason: more accurate question

Similar Threads

  1. Get source web page after clicking next Button
    By noob in forum New To Java
    Replies: 1
    Last Post: 03-05-2010, 09:01 PM
  2. python source to java source converter?
    By conor147 in forum New To Java
    Replies: 0
    Last Post: 01-15-2010, 05:14 AM
  3. Page Source
    By fawkes in forum Networking
    Replies: 0
    Last Post: 03-24-2009, 06:06 PM
  4. Replies: 0
    Last Post: 01-29-2009, 10:43 AM
  5. Replies: 1
    Last Post: 11-28-2008, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts