Add user agent to request. Fix: 231

This commit is contained in:
Michael Teeuw 2016-05-11 09:07:10 +02:00
parent fc0a4d90df
commit 85151b23d3

View File

@ -76,7 +76,8 @@ var Fetcher = function(url, reloadInterval, encoding) {
scheduleTimer(); scheduleTimer();
}); });
request({uri: url, encoding: null}).pipe(iconv.decodeStream(encoding)).pipe(parser); var headers = {'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A'};
request({uri: url, encoding: null, headers: headers}).pipe(iconv.decodeStream(encoding)).pipe(parser);
}; };