Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

http.requests not working on 1 site

$
0
0

I'm gathering daily weather forecast temperature data from 3 sites/pages via the http.requests library. It works fine on the 2 url's that are commented out in my code, but not on the third. Any idea why?

import http.requests.*;

public void setup() 
{
    size(400,400);
    smooth();

  //GetRequest get = new GetRequest("http://" + "forecast.weather.gov/MapClick.php?CityName=State+College&state=PA&site=CTP&textField1=40.7906&textField2=-77.8579");
  //GetRequest get = new GetRequest("http://" + "api.wunderground.com/api/dc43c0b770a7c1e0/forecast/q/PA/State_College.json");

    GetRequest get = new GetRequest("http://" + "www.accuweather.com/en/us/state-college-pa/16801/daily-weather-forecast/6787_pc");
    get.send();
    println("Reponse Content: " + get.getContent());
    println("Reponse Content-Length Header: " + get.getHeader("Content-Length"));
}

Thanks for any suggestions you may have,

Wade


Viewing all articles
Browse latest Browse all 2896

Trending Articles