package com.doctor.common.util.weather;
import com.alibaba.fastjson.JSONObject;
import com.doctor.common.util.HttpUtil;
import com.doctor.common.util.StringUtil;
public class WeatherUtil {
private static final String WEATHER_SK_URL = "http://www.weather.com.cn/data/sk/{}.html";
private static final String WEATHER_CITY_URL = "http://www.weather.com.cn/data/cityinfo/{}.html";
private static final String WEATHER_PIC_URL = "http://www.weather.com.cn/m/i/weatherpic/29x20/{}";
public static Weather weather(String code) {
String result = getSk(code);
Weather whSk = null;
if (StringUtil.isNotEmpty(result)) {
JSONObject jo = JSONObject.parseObject(result);
whSk = JSONObject.parseObject(jo.getString("weatherinfo"), Weather.class);
}
re