6 |
|
|
7 |
#include <vector> |
#include <vector> |
8 |
#include <sstream> |
#include <sstream> |
9 |
|
#include <stdexcept> |
10 |
|
|
11 |
|
|
12 |
using namespace std; |
using namespace std; |
13 |
|
|
61 |
string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname; |
string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname; |
62 |
|
|
63 |
string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); |
string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); |
64 |
|
|
65 |
|
if (raw_doc == "") |
66 |
|
{ |
67 |
|
throw std::runtime_error("Connection timeout"); |
68 |
|
} |
69 |
|
|
70 |
raw_doc = Util::str_replace(raw_doc, "\"", "'"); |
raw_doc = Util::str_replace(raw_doc, "\"", "'"); |
71 |
|
|
72 |
string_nocase html = raw_doc.c_str(); |
string_nocase html = raw_doc.c_str(); |