Fixed issue with schedule name parsing, try number 2
This commit is contained in:
parent
125ec56abf
commit
3e8f58b4b1
|
@ -13,7 +13,7 @@ function get(req, res, next) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function api(lookup, callback) {
|
function api(lookup, callback) {
|
||||||
get_schedule(lookup.data[0].url, callback)
|
get_schedule(lookup.data[0].url, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Function for getting the page via http.
|
//Function for getting the page via http.
|
||||||
|
@ -43,7 +43,7 @@ function schedule_types(page) {
|
||||||
for (element of extract) {
|
for (element of extract) {
|
||||||
element != '' ? types.push({
|
element != '' ? types.push({
|
||||||
'letter': element.substr(0, 1),
|
'letter': element.substr(0, 1),
|
||||||
'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/g).join(' ').slice(1),
|
'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/gi).join(' ').slice(1).toLowerCase(),
|
||||||
'tab': tab++
|
'tab': tab++
|
||||||
}) : null;
|
}) : null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue