6 |
import java.util.Map; |
import java.util.Map; |
7 |
import java.util.logging.Logger; |
import java.util.logging.Logger; |
8 |
|
|
9 |
|
import com.gargoylesoftware.htmlunit.BrowserVersion; |
10 |
import com.gargoylesoftware.htmlunit.WebClient; |
import com.gargoylesoftware.htmlunit.WebClient; |
11 |
import com.gargoylesoftware.htmlunit.html.DomNodeList; |
import com.gargoylesoftware.htmlunit.html.DomNodeList; |
12 |
import com.gargoylesoftware.htmlunit.html.HtmlElement; |
import com.gargoylesoftware.htmlunit.html.HtmlElement; |
82 |
|
|
83 |
List<DepartureBean> departureList = new ArrayList<DepartureBean>(); |
List<DepartureBean> departureList = new ArrayList<DepartureBean>(); |
84 |
|
|
85 |
final WebClient webClient = new WebClient(); |
final WebClient webClient = new WebClient( BrowserVersion.FIREFOX_3 ); |
86 |
webClient.setTimeout(2500); |
webClient.setTimeout(2500); |
87 |
webClient.setJavaScriptEnabled(false); |
webClient.setJavaScriptEnabled(false); |
88 |
|
|
138 |
} else { |
} else { |
139 |
logger.warning("No departures found for station=" + stationcode + ", type=" + type); |
logger.warning("No departures found for station=" + stationcode + ", type=" + type); |
140 |
} |
} |
141 |
|
webClient.closeAllWindows(); |
142 |
|
|
143 |
return departureList; |
return departureList; |
144 |
} |
} |
147 |
|
|
148 |
List<DepartureBean> departureList = new ArrayList<DepartureBean>(); |
List<DepartureBean> departureList = new ArrayList<DepartureBean>(); |
149 |
|
|
150 |
final WebClient webClient = new WebClient(); |
final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3); |
151 |
webClient.setTimeout(2500); |
webClient.setTimeout(2500); |
152 |
webClient.setJavaScriptEnabled(false); |
webClient.setJavaScriptEnabled(false); |
153 |
|
|
203 |
} else { |
} else { |
204 |
logger.warning("No departures found for station=" + stationcode + ", type=" + type); |
logger.warning("No departures found for station=" + stationcode + ", type=" + type); |
205 |
} |
} |
206 |
|
webClient.closeAllWindows(); |
207 |
|
|
208 |
|
|
209 |
return departureList; |
return departureList; |
210 |
} |
} |
253 |
} |
} |
254 |
|
|
255 |
|
|
|
|
|
256 |
return number; |
return number; |
257 |
} |
} |
258 |
|
|