how can i do web scraping using java?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leninbecse
    New Member
    • Aug 2010
    • 15

    how can i do web scraping using java?

    how can i do web scraping using java?please respond quickly
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    Read API of URL-class, especially method openStream()!
    (That was quick, wasn't it? Any better explanation takes longer!)

    Comment

    • leninbecse
      New Member
      • Aug 2010
      • 15

      #3
      thank you sir,how can i send the value to web using openstream()?

      Comment

      • chaarmann
        Recognized Expert Contributor
        • Nov 2007
        • 785

        #4
        Have you read the API-Docu about URL-class? Then you should know that openStream() was given there as an example to open an InputStream for the response. (That means reading the response web page after you sent the inquiry) If you want to "send value" (inquiry parameter), just give the parameter and its value inside your URL-string. For example "http://localhost/test.cgi?parame ter1=7&paramete r2=hello". If the parameter value is too long (more than 2000 characters), use POST.

        Comment

        Working...