Fetching weather report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhuvanad
    New Member
    • Jan 2008
    • 3

    #1

    Fetching weather report

    hello ,
    i need help in geting the current weather report from a web page
    to a program i'm working on in java
    can anyone help me with this???

    thanks.
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    Originally posted by bhuvanad
    hello ,
    i need help in geting the current weather report from a web page
    to a program i'm working on in java
    can anyone help me with this???

    thanks.
    Just do what a browser is doing: read the web page as text into a String.
    But instead of displaying, search inside the string for the weather report and extract that substring.

    To read a webpage as String, you can use methods of class HttpURLConnecti on

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      I bet, if you look around, you will find weather report web services. If you don't know about WS, once you do a little swotting, you'll see they're easier to interact with and more reliable that web page scraping.

      Comment

      Working...