scrapemyferry 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +2 -0
- package/README.md +1 -1
- package/dist/lib/sources/bcf/config.d.ts +16 -0
- package/dist/lib/sources/bcf/config.d.ts.map +1 -1
- package/dist/lib/sources/bcf/config.js +10 -1
- package/dist/lib/sources/bcf/config.js.map +1 -1
- package/dist/lib/sources/bcf/dailySchedule.d.ts.map +1 -1
- package/dist/lib/sources/bcf/dailySchedule.js +2 -5
- package/dist/lib/sources/bcf/dailySchedule.js.map +1 -1
- package/dist/lib/sources/bcf/routes.d.ts.map +1 -1
- package/dist/lib/sources/bcf/routes.js +2 -5
- package/dist/lib/sources/bcf/routes.js.map +1 -1
- package/dist/lib/sources/bcf/scrapeUrl.d.ts +9 -0
- package/dist/lib/sources/bcf/scrapeUrl.d.ts.map +1 -0
- package/dist/lib/sources/bcf/scrapeUrl.js +63 -0
- package/dist/lib/sources/bcf/scrapeUrl.js.map +1 -0
- package/dist/lib/sources/bcf/seasonalSchedule.d.ts.map +1 -1
- package/dist/lib/sources/bcf/seasonalSchedule.js +2 -5
- package/dist/lib/sources/bcf/seasonalSchedule.js.map +1 -1
- package/package.json +6 -2
- package/coverage/clover.xml +0 -312
- package/coverage/coverage-final.json +0 -18
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -176
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/cli.ts.html +0 -436
- package/coverage/lcov-report/src/index.html +0 -131
- package/coverage/lcov-report/src/index.ts.html +0 -88
- package/coverage/lcov-report/src/lib/index.html +0 -131
- package/coverage/lcov-report/src/lib/index.ts.html +0 -94
- package/coverage/lcov-report/src/lib/setup.ts.html +0 -109
- package/coverage/lcov-report/src/lib/sources/bcf/config.ts.html +0 -103
- package/coverage/lcov-report/src/lib/sources/bcf/currentConditions.ts.html +0 -454
- package/coverage/lcov-report/src/lib/sources/bcf/dailySchedule.ts.html +0 -235
- package/coverage/lcov-report/src/lib/sources/bcf/departures.ts.html +0 -406
- package/coverage/lcov-report/src/lib/sources/bcf/index.html +0 -251
- package/coverage/lcov-report/src/lib/sources/bcf/index.ts.html +0 -106
- package/coverage/lcov-report/src/lib/sources/bcf/routes.ts.html +0 -421
- package/coverage/lcov-report/src/lib/sources/bcf/sailing.ts.html +0 -325
- package/coverage/lcov-report/src/lib/sources/bcf/seasonalSchedule.ts.html +0 -367
- package/coverage/lcov-report/src/lib/sources/bcf/urls.ts.html +0 -331
- package/coverage/lcov-report/src/lib/sources/bcf/utils.ts.html +0 -226
- package/coverage/lcov-report/src/lib/sources/index.html +0 -131
- package/coverage/lcov-report/src/lib/sources/index.ts.html +0 -91
- package/coverage/lcov-report/src/lib/sources/source.ts.html +0 -112
- package/coverage/lcov-report/src/lib/test/index.html +0 -116
- package/coverage/lcov-report/src/lib/test/jest-conditional.ts.html +0 -265
- package/coverage/lcov.info +0 -608
package/.prettierignore
ADDED
package/README.md
CHANGED
|
@@ -2,9 +2,25 @@ export declare const baseUrl = "https://www.bcferries.com";
|
|
|
2
2
|
export declare const bookingPath = "/RouteSelectionPage";
|
|
3
3
|
export declare const tz = "America/Vancouver";
|
|
4
4
|
export declare const tzOffset: string;
|
|
5
|
+
export declare const headers: {
|
|
6
|
+
Accept: string;
|
|
7
|
+
Connection: string;
|
|
8
|
+
'User-Agent': string;
|
|
9
|
+
'Accept-Language': string;
|
|
10
|
+
'Cache-Control': string;
|
|
11
|
+
Pragma: string;
|
|
12
|
+
};
|
|
5
13
|
export declare const config: {
|
|
6
14
|
baseUrl: string;
|
|
7
15
|
bookingPath: string;
|
|
16
|
+
headers: {
|
|
17
|
+
Accept: string;
|
|
18
|
+
Connection: string;
|
|
19
|
+
'User-Agent': string;
|
|
20
|
+
'Accept-Language': string;
|
|
21
|
+
'Cache-Control': string;
|
|
22
|
+
Pragma: string;
|
|
23
|
+
};
|
|
8
24
|
tz: string;
|
|
9
25
|
tzOffset: string;
|
|
10
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,8BAA8B,CAAA;AAClD,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,eAAO,MAAM,EAAE,sBAAsB,CAAA;AACrC,eAAO,MAAM,QAAQ,QAA6B,CAAA;AAClD,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/config.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,8BAA8B,CAAA;AAClD,eAAO,MAAM,WAAW,wBAAwB,CAAA;AAChD,eAAO,MAAM,EAAE,sBAAsB,CAAA;AACrC,eAAO,MAAM,QAAQ,QAA6B,CAAA;AAClD,eAAO,MAAM,OAAO;;;;;;;CAQnB,CAAA;AACD,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAMlB,CAAA"}
|
|
@@ -3,15 +3,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.config = exports.tzOffset = exports.tz = exports.bookingPath = exports.baseUrl = void 0;
|
|
6
|
+
exports.config = exports.headers = exports.tzOffset = exports.tz = exports.bookingPath = exports.baseUrl = void 0;
|
|
7
7
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
8
8
|
exports.baseUrl = 'https://www.bcferries.com';
|
|
9
9
|
exports.bookingPath = '/RouteSelectionPage';
|
|
10
10
|
exports.tz = 'America/Vancouver';
|
|
11
11
|
exports.tzOffset = (0, dayjs_1.default)().tz(exports.tz).format('Z');
|
|
12
|
+
exports.headers = {
|
|
13
|
+
Accept: '*/*',
|
|
14
|
+
Connection: 'keep-alive',
|
|
15
|
+
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36',
|
|
16
|
+
'Accept-Language': 'en-US,en;q=0.9',
|
|
17
|
+
'Cache-Control': 'no-cache',
|
|
18
|
+
Pragma: 'no-cache',
|
|
19
|
+
};
|
|
12
20
|
exports.config = {
|
|
13
21
|
baseUrl: exports.baseUrl,
|
|
14
22
|
bookingPath: exports.bookingPath,
|
|
23
|
+
headers: exports.headers,
|
|
15
24
|
tz: exports.tz,
|
|
16
25
|
tzOffset: exports.tzOffset,
|
|
17
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/config.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEZ,QAAA,OAAO,GAAG,2BAA2B,CAAA;AACrC,QAAA,WAAW,GAAG,qBAAqB,CAAA;AACnC,QAAA,EAAE,GAAG,mBAAmB,CAAA;AACxB,QAAA,QAAQ,GAAG,IAAA,eAAK,GAAE,CAAC,EAAE,CAAC,UAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AACrC,QAAA,MAAM,GAAG;IACpB,OAAO,EAAP,eAAO;IACP,WAAW,EAAX,mBAAW;IACX,EAAE,EAAF,UAAE;IACF,QAAQ,EAAR,gBAAQ;CACT,CAAA"}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/config.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEZ,QAAA,OAAO,GAAG,2BAA2B,CAAA;AACrC,QAAA,WAAW,GAAG,qBAAqB,CAAA;AACnC,QAAA,EAAE,GAAG,mBAAmB,CAAA;AACxB,QAAA,QAAQ,GAAG,IAAA,eAAK,GAAE,CAAC,EAAE,CAAC,UAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AACrC,QAAA,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,YAAY;IACxB,YAAY,EACV,uHAAuH;IACzH,iBAAiB,EAAE,gBAAgB;IACnC,eAAe,EAAE,UAAU;IAC3B,MAAM,EAAE,UAAU;CACnB,CAAA;AACY,QAAA,MAAM,GAAG;IACpB,OAAO,EAAP,eAAO;IACP,WAAW,EAAX,mBAAW;IACX,OAAO,EAAP,eAAO;IACP,EAAE,EAAF,UAAE;IACF,QAAQ,EAAR,gBAAQ;CACT,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dailySchedule.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/dailySchedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"dailySchedule.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/dailySchedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAa7C,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,0BAoCpE"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.dailySchedule = dailySchedule;
|
|
7
|
-
const scrape_it_1 = __importDefault(require("scrape-it"));
|
|
8
4
|
const urls_1 = require("./urls");
|
|
5
|
+
const scrapeUrl_1 = require("./scrapeUrl");
|
|
9
6
|
function dailySchedule(from, to, date) {
|
|
10
7
|
const url = (0, urls_1.dailyScheduleUrl)(from, to, date);
|
|
11
|
-
return (0,
|
|
8
|
+
return (0, scrapeUrl_1.scrapeUrlWithCookies)(url, {
|
|
12
9
|
dailySchedule: {
|
|
13
10
|
listItem: '#dailyScheduleTableOnward > tbody > tr',
|
|
14
11
|
data: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dailySchedule.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/dailySchedule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dailySchedule.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/dailySchedule.ts"],"names":[],"mappings":";;AAcA,sCAoCC;AAhDD,iCAAyC;AACzC,2CAAkD;AAWlD,SAAgB,aAAa,CAAC,IAAY,EAAE,EAAU,EAAE,IAAa;IACnE,MAAM,GAAG,GAAG,IAAA,uBAAgB,EAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;IAC5C,OAAO,IAAA,gCAAoB,EAAoB,GAAG,EAAE;QAClD,aAAa,EAAE;YACb,QAAQ,EAAE,wCAAwC;YAClD,IAAI,EAAE;gBACJ,MAAM,EAAE;oBACN,QAAQ,EAAE,IAAI;oBACd,EAAE,EAAE,CAAC;oBACL,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;iBAC1C;gBACD,MAAM,EAAE;oBACN,QAAQ,EAAE,IAAI;oBACd,EAAE,EAAE,CAAC;oBACL,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;iBAC1C;gBACD,QAAQ,EAAE;oBACR,QAAQ,EAAE,IAAI;oBACd,EAAE,EAAE,CAAC;iBACN;gBACD,IAAI,EAAE;oBACJ,QAAQ,EAAE,IAAI;oBACd,EAAE,EAAE,CAAC;iBACN;aACF;SACF;KACF,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAElB,SAAS,SAAS,CAAC,EACjB,IAAI,EAAE,EAAE,aAAa,EAAE,GACkB;QACzC,OAAO;YACL,GAAG;YACH,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,MAAM,CAAC;SACzE,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/routes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAmBtC,wBAAgB,MAAM,oBA4FrB"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.routes = routes;
|
|
7
|
-
const scrape_it_1 = __importDefault(require("scrape-it"));
|
|
8
4
|
const urls_1 = require("./urls");
|
|
5
|
+
const scrapeUrl_1 = require("./scrapeUrl");
|
|
9
6
|
function routes() {
|
|
10
7
|
const url = (0, urls_1.routesUrl)();
|
|
11
|
-
return (0,
|
|
8
|
+
return (0, scrapeUrl_1.scrapeUrlWithCookies)(url, {
|
|
12
9
|
regionNames: {
|
|
13
10
|
listItem: '#schedulesList header > span',
|
|
14
11
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/routes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/routes.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import scrapeIt from 'scrape-it';
|
|
2
|
+
interface ScrapeUrlOptions {
|
|
3
|
+
url: string;
|
|
4
|
+
withCookies?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function scrapeUrl<T>(urlOrOpts: string | ScrapeUrlOptions, opts: scrapeIt.ScrapeOptions): Promise<scrapeIt.ScrapeResult<T>>;
|
|
7
|
+
export declare function scrapeUrlWithCookies<T>(url: string, opts: scrapeIt.ScrapeOptions): Promise<scrapeIt.ScrapeResult<T>>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scrapeUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrapeUrl.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/scrapeUrl.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,WAAW,CAAA;AAMhC,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAsB,SAAS,CAAC,CAAC,EAC/B,SAAS,EAAE,MAAM,GAAG,gBAAgB,EACpC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CA2BnC;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,QAAQ,CAAC,aAAa,GAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAEnC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.scrapeUrl = scrapeUrl;
|
|
30
|
+
exports.scrapeUrlWithCookies = scrapeUrlWithCookies;
|
|
31
|
+
const axios_1 = __importDefault(require("axios"));
|
|
32
|
+
const axios_cookiejar_support_1 = require("axios-cookiejar-support");
|
|
33
|
+
const Cheerio = __importStar(require("cheerio"));
|
|
34
|
+
const scrape_it_1 = __importDefault(require("scrape-it"));
|
|
35
|
+
const tough_cookie_1 = require("tough-cookie");
|
|
36
|
+
const config_1 = require("./config");
|
|
37
|
+
const { headers } = config_1.config;
|
|
38
|
+
async function scrapeUrl(urlOrOpts, opts) {
|
|
39
|
+
if (typeof urlOrOpts === 'string' || !urlOrOpts.withCookies) {
|
|
40
|
+
return (0, scrape_it_1.default)(urlOrOpts, opts);
|
|
41
|
+
}
|
|
42
|
+
const jar = new tough_cookie_1.CookieJar();
|
|
43
|
+
const client = (0, axios_cookiejar_support_1.wrapper)(axios_1.default.create({
|
|
44
|
+
jar,
|
|
45
|
+
withCredentials: true, // Forces passing credentials cross-origin
|
|
46
|
+
}));
|
|
47
|
+
const { url } = urlOrOpts;
|
|
48
|
+
const response = await client.get(url, { headers });
|
|
49
|
+
const body = response.data;
|
|
50
|
+
const $ = Cheerio.load(body);
|
|
51
|
+
const data = scrape_it_1.default.scrapeHTML($, opts);
|
|
52
|
+
return {
|
|
53
|
+
data,
|
|
54
|
+
status: response.status,
|
|
55
|
+
statusText: response.statusText,
|
|
56
|
+
$,
|
|
57
|
+
body,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function scrapeUrlWithCookies(url, opts) {
|
|
61
|
+
return scrapeUrl({ url, withCookies: true }, opts);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=scrapeUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrapeUrl.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/scrapeUrl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,8BA8BC;AAED,oDAKC;AAnDD,kDAAyB;AACzB,qEAAiD;AACjD,iDAAkC;AAClC,0DAAgC;AAChC,+CAAwC;AACxC,qCAAiC;AAEjC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAM,CAAA;AAOnB,KAAK,UAAU,SAAS,CAC7B,SAAoC,EACpC,IAA4B;IAE5B,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5D,OAAO,IAAA,mBAAQ,EAAI,SAAS,EAAE,IAAI,CAAC,CAAA;IACrC,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,wBAAS,EAAE,CAAA;IAE3B,MAAM,MAAM,GAAG,IAAA,iCAAO,EACpB,eAAK,CAAC,MAAM,CAAC;QACX,GAAG;QACH,eAAe,EAAE,IAAI,EAAE,0CAA0C;KAClE,CAAC,CACH,CAAA;IAED,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAA;IACzB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,CAAA;IACnD,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAA;IAC1B,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,IAAI,GAAG,mBAAQ,CAAC,UAAU,CAAI,CAAC,EAAE,IAAI,CAAC,CAAA;IAE5C,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,CAAC;QACD,IAAI;KACuB,CAAA;AAC/B,CAAC;AAED,SAAgB,oBAAoB,CAClC,GAAW,EACX,IAA4B;IAE5B,OAAO,SAAS,CAAI,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,CAAA;AACvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seasonalSchedule.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/seasonalSchedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"seasonalSchedule.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/seasonalSchedule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAkBhD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,6BA2ExD"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.seasonalSchedule = seasonalSchedule;
|
|
7
|
-
const scrape_it_1 = __importDefault(require("scrape-it"));
|
|
8
4
|
const urls_1 = require("./urls");
|
|
5
|
+
const scrapeUrl_1 = require("./scrapeUrl");
|
|
9
6
|
function seasonalSchedule(from, to) {
|
|
10
7
|
const url = (0, urls_1.seasonalScheduleUrl)(from, to);
|
|
11
|
-
return (0,
|
|
8
|
+
return (0, scrapeUrl_1.scrapeUrlWithCookies)(url, {
|
|
12
9
|
seasonalSchedule: {
|
|
13
10
|
selector: '#seasonalSchedulesForm table.table-seasonal-schedule',
|
|
14
11
|
eq: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seasonalSchedule.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/seasonalSchedule.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"seasonalSchedule.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/seasonalSchedule.ts"],"names":[],"mappings":";;AAmBA,4CA2EC;AA5FD,iCAA4C;AAC5C,2CAAkD;AAgBlD,SAAgB,gBAAgB,CAAC,IAAY,EAAE,EAAU;IACvD,MAAM,GAAG,GAAG,IAAA,0BAAmB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAA;IACzC,OAAO,IAAA,gCAAoB,EAAuB,GAAG,EAAE;QACrD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,sDAAsD;YAChE,EAAE,EAAE,CAAC;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE;oBACJ,QAAQ,EAAE,OAAO;oBACjB,IAAI,EAAE;wBACJ,GAAG,EAAE;4BACH,QAAQ,EAAE,IAAI;4BACd,IAAI,EAAE,mBAAmB;yBAC1B;qBACF;iBACF;gBACD,YAAY,EAAE;oBACZ,QAAQ,EAAE,OAAO;oBACjB,IAAI,EAAE;wBACJ,SAAS,EAAE;4BACT,QAAQ,EAAE,IAAI;4BACd,IAAI,EAAE;gCACJ,MAAM,EAAE;oCACN,QAAQ,EAAE,WAAW;oCACrB,EAAE,EAAE,CAAC;oCACL,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;iCAC1C;gCACD,MAAM,EAAE;oCACN,QAAQ,EAAE,IAAI;oCACd,EAAE,EAAE,CAAC;oCACL,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE;iCAC1C;gCACD,QAAQ,EAAE;oCACR,QAAQ,EAAE,IAAI;oCACd,EAAE,EAAE,CAAC;iCACN;gCACD,QAAQ,EAAE;oCACR,QAAQ,EAAE,qBAAqB;oCAC/B,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CACnB,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;iCAC7C;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAElB,SAAS,SAAS,CAAC,EACjB,IAAI,EAAE,EACJ,gBAAgB,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,GACzC,GAC2C;QAC5C,OAAO;YACL,GAAG;YACH,IAAI,EAAE,YAAY;iBACf,MAAM,CACL,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAChB,SAAS,CAAC,MAAM,GAAG,CAAC;gBACpB,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,MAAM,CAAC,CAC3D;iBACA,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC9B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG;gBACpB,QAAQ,EAAE,SAAS;qBAChB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,IAAI,MAAM,CAAC;qBAChD,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;oBACnC,GAAG,QAAQ;oBACX,QAAQ,EAAE,QAAQ;yBACf,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;yBACxC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;iBACxC,CAAC,CAAC;aACN,CAAC,CAAC;SACN,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scrapemyferry",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Scapes your ferry data.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,8 +22,12 @@
|
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"axios": "^1.17.0",
|
|
26
|
+
"axios-cookiejar-support": "^7.0.0",
|
|
27
|
+
"cheerio": "^1.0.0",
|
|
25
28
|
"dayjs": "^1.11.13",
|
|
26
|
-
"scrape-it": "^6.1.3"
|
|
29
|
+
"scrape-it": "^6.1.3",
|
|
30
|
+
"tough-cookie": "^6.0.1"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
33
|
"@types/jest": "^29.5.12",
|
package/coverage/clover.xml
DELETED
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="1747932579715" clover="3.2.0">
|
|
3
|
-
<project timestamp="1747932579715" name="All files">
|
|
4
|
-
<metrics statements="240" coveredstatements="146" conditionals="61" coveredconditionals="25" methods="77" coveredmethods="63" elements="378" coveredelements="234" complexity="0" loc="240" ncloc="240" packages="5" files="17" classes="17"/>
|
|
5
|
-
<package name="src">
|
|
6
|
-
<metrics statements="67" coveredstatements="0" conditionals="27" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
7
|
-
<file name="cli.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/cli.ts">
|
|
8
|
-
<metrics statements="66" coveredstatements="0" conditionals="27" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
9
|
-
<line num="1" count="0" type="stmt"/>
|
|
10
|
-
<line num="3" count="0" type="stmt"/>
|
|
11
|
-
<line num="6" count="0" type="stmt"/>
|
|
12
|
-
<line num="9" count="0" type="stmt"/>
|
|
13
|
-
<line num="12" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
14
|
-
<line num="13" count="0" type="stmt"/>
|
|
15
|
-
<line num="16" count="0" type="stmt"/>
|
|
16
|
-
<line num="19" count="0" type="stmt"/>
|
|
17
|
-
<line num="22" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
18
|
-
<line num="23" count="0" type="cond" truecount="0" falsecount="6"/>
|
|
19
|
-
<line num="25" count="0" type="stmt"/>
|
|
20
|
-
<line num="26" count="0" type="stmt"/>
|
|
21
|
-
<line num="27" count="0" type="stmt"/>
|
|
22
|
-
<line num="28" count="0" type="stmt"/>
|
|
23
|
-
<line num="30" count="0" type="stmt"/>
|
|
24
|
-
<line num="31" count="0" type="stmt"/>
|
|
25
|
-
<line num="34" count="0" type="stmt"/>
|
|
26
|
-
<line num="37" count="0" type="stmt"/>
|
|
27
|
-
<line num="39" count="0" type="stmt"/>
|
|
28
|
-
<line num="40" count="0" type="stmt"/>
|
|
29
|
-
<line num="41" count="0" type="stmt"/>
|
|
30
|
-
<line num="42" count="0" type="stmt"/>
|
|
31
|
-
<line num="44" count="0" type="stmt"/>
|
|
32
|
-
<line num="45" count="0" type="stmt"/>
|
|
33
|
-
<line num="46" count="0" type="stmt"/>
|
|
34
|
-
<line num="47" count="0" type="stmt"/>
|
|
35
|
-
<line num="49" count="0" type="stmt"/>
|
|
36
|
-
<line num="50" count="0" type="stmt"/>
|
|
37
|
-
<line num="51" count="0" type="stmt"/>
|
|
38
|
-
<line num="52" count="0" type="stmt"/>
|
|
39
|
-
<line num="54" count="0" type="stmt"/>
|
|
40
|
-
<line num="55" count="0" type="stmt"/>
|
|
41
|
-
<line num="56" count="0" type="stmt"/>
|
|
42
|
-
<line num="57" count="0" type="stmt"/>
|
|
43
|
-
<line num="60" count="0" type="stmt"/>
|
|
44
|
-
<line num="61" count="0" type="stmt"/>
|
|
45
|
-
<line num="62" count="0" type="stmt"/>
|
|
46
|
-
<line num="64" count="0" type="stmt"/>
|
|
47
|
-
<line num="67" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
48
|
-
<line num="68" count="0" type="stmt"/>
|
|
49
|
-
<line num="69" count="0" type="stmt"/>
|
|
50
|
-
<line num="70" count="0" type="stmt"/>
|
|
51
|
-
<line num="73" count="0" type="cond" truecount="0" falsecount="2"/>
|
|
52
|
-
<line num="74" count="0" type="stmt"/>
|
|
53
|
-
<line num="75" count="0" type="stmt"/>
|
|
54
|
-
<line num="78" count="0" type="cond" truecount="0" falsecount="4"/>
|
|
55
|
-
<line num="79" count="0" type="stmt"/>
|
|
56
|
-
<line num="82" count="0" type="stmt"/>
|
|
57
|
-
<line num="90" count="0" type="stmt"/>
|
|
58
|
-
<line num="92" count="0" type="stmt"/>
|
|
59
|
-
<line num="93" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
60
|
-
<line num="94" count="0" type="stmt"/>
|
|
61
|
-
<line num="95" count="0" type="stmt"/>
|
|
62
|
-
<line num="98" count="0" type="cond" truecount="0" falsecount="6"/>
|
|
63
|
-
<line num="100" count="0" type="stmt"/>
|
|
64
|
-
<line num="101" count="0" type="stmt"/>
|
|
65
|
-
<line num="103" count="0" type="stmt"/>
|
|
66
|
-
<line num="104" count="0" type="stmt"/>
|
|
67
|
-
<line num="106" count="0" type="stmt"/>
|
|
68
|
-
<line num="107" count="0" type="stmt"/>
|
|
69
|
-
<line num="109" count="0" type="stmt"/>
|
|
70
|
-
<line num="110" count="0" type="stmt"/>
|
|
71
|
-
<line num="112" count="0" type="stmt"/>
|
|
72
|
-
<line num="113" count="0" type="stmt"/>
|
|
73
|
-
<line num="115" count="0" type="stmt"/>
|
|
74
|
-
<line num="116" count="0" type="stmt"/>
|
|
75
|
-
</file>
|
|
76
|
-
<file name="index.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/index.ts">
|
|
77
|
-
<metrics statements="1" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
78
|
-
<line num="1" count="0" type="stmt"/>
|
|
79
|
-
</file>
|
|
80
|
-
</package>
|
|
81
|
-
<package name="src.lib">
|
|
82
|
-
<metrics statements="9" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
83
|
-
<file name="index.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/index.ts">
|
|
84
|
-
<metrics statements="2" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
85
|
-
<line num="1" count="0" type="stmt"/>
|
|
86
|
-
<line num="3" count="0" type="stmt"/>
|
|
87
|
-
</file>
|
|
88
|
-
<file name="setup.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/setup.ts">
|
|
89
|
-
<metrics statements="7" coveredstatements="7" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
90
|
-
<line num="1" count="15" type="stmt"/>
|
|
91
|
-
<line num="2" count="15" type="stmt"/>
|
|
92
|
-
<line num="3" count="15" type="stmt"/>
|
|
93
|
-
<line num="4" count="15" type="stmt"/>
|
|
94
|
-
<line num="6" count="15" type="stmt"/>
|
|
95
|
-
<line num="7" count="15" type="stmt"/>
|
|
96
|
-
<line num="8" count="15" type="stmt"/>
|
|
97
|
-
</file>
|
|
98
|
-
</package>
|
|
99
|
-
<package name="src.lib.sources">
|
|
100
|
-
<metrics statements="6" coveredstatements="0" conditionals="1" coveredconditionals="0" methods="2" coveredmethods="0"/>
|
|
101
|
-
<file name="index.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/index.ts">
|
|
102
|
-
<metrics statements="2" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
103
|
-
<line num="1" count="0" type="stmt"/>
|
|
104
|
-
<line num="2" count="0" type="stmt"/>
|
|
105
|
-
</file>
|
|
106
|
-
<file name="source.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/source.ts">
|
|
107
|
-
<metrics statements="4" coveredstatements="0" conditionals="1" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
|
108
|
-
<line num="1" count="0" type="stmt"/>
|
|
109
|
-
<line num="4" count="0" type="stmt"/>
|
|
110
|
-
<line num="5" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
111
|
-
<line num="7" count="0" type="stmt"/>
|
|
112
|
-
</file>
|
|
113
|
-
</package>
|
|
114
|
-
<package name="src.lib.sources.bcf">
|
|
115
|
-
<metrics statements="146" coveredstatements="134" conditionals="29" coveredconditionals="25" methods="70" coveredmethods="62"/>
|
|
116
|
-
<file name="config.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/config.ts">
|
|
117
|
-
<metrics statements="3" coveredstatements="3" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
|
118
|
-
<line num="1" count="15" type="stmt"/>
|
|
119
|
-
<line num="2" count="15" type="stmt"/>
|
|
120
|
-
<line num="3" count="15" type="stmt"/>
|
|
121
|
-
</file>
|
|
122
|
-
<file name="currentConditions.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/currentConditions.ts">
|
|
123
|
-
<metrics statements="12" coveredstatements="12" conditionals="0" coveredconditionals="0" methods="8" coveredmethods="8"/>
|
|
124
|
-
<line num="1" count="2" type="stmt"/>
|
|
125
|
-
<line num="3" count="2" type="stmt"/>
|
|
126
|
-
<line num="12" count="2" type="stmt"/>
|
|
127
|
-
<line num="13" count="1" type="stmt"/>
|
|
128
|
-
<line num="14" count="1" type="stmt"/>
|
|
129
|
-
<line num="18" count="1" type="stmt"/>
|
|
130
|
-
<line num="31" count="1" type="stmt"/>
|
|
131
|
-
<line num="52" count="12" type="stmt"/>
|
|
132
|
-
<line num="58" count="12" type="stmt"/>
|
|
133
|
-
<line num="74" count="12" type="stmt"/>
|
|
134
|
-
<line num="111" count="1" type="stmt"/>
|
|
135
|
-
<line num="119" count="12" type="stmt"/>
|
|
136
|
-
</file>
|
|
137
|
-
<file name="dailySchedule.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/dailySchedule.ts">
|
|
138
|
-
<metrics statements="9" coveredstatements="9" conditionals="2" coveredconditionals="2" methods="5" coveredmethods="5"/>
|
|
139
|
-
<line num="1" count="2" type="stmt"/>
|
|
140
|
-
<line num="3" count="2" type="stmt"/>
|
|
141
|
-
<line num="14" count="2" type="stmt"/>
|
|
142
|
-
<line num="15" count="1" type="stmt"/>
|
|
143
|
-
<line num="16" count="1" type="stmt"/>
|
|
144
|
-
<line num="23" count="16" type="stmt"/>
|
|
145
|
-
<line num="28" count="16" type="stmt"/>
|
|
146
|
-
<line num="45" count="1" type="stmt"/>
|
|
147
|
-
<line num="47" count="16" type="cond" truecount="2" falsecount="0"/>
|
|
148
|
-
</file>
|
|
149
|
-
<file name="departures.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/departures.ts">
|
|
150
|
-
<metrics statements="15" coveredstatements="15" conditionals="2" coveredconditionals="2" methods="11" coveredmethods="11"/>
|
|
151
|
-
<line num="1" count="2" type="stmt"/>
|
|
152
|
-
<line num="3" count="2" type="stmt"/>
|
|
153
|
-
<line num="7" count="2" type="stmt"/>
|
|
154
|
-
<line num="8" count="1" type="stmt"/>
|
|
155
|
-
<line num="9" count="1" type="stmt"/>
|
|
156
|
-
<line num="12" count="1" type="stmt"/>
|
|
157
|
-
<line num="20" count="3" type="stmt"/>
|
|
158
|
-
<line num="26" count="3" type="stmt"/>
|
|
159
|
-
<line num="50" count="30" type="stmt"/>
|
|
160
|
-
<line num="59" count="30" type="stmt"/>
|
|
161
|
-
<line num="68" count="30" type="stmt"/>
|
|
162
|
-
<line num="76" count="30" type="stmt"/>
|
|
163
|
-
<line num="93" count="1" type="stmt"/>
|
|
164
|
-
<line num="96" count="3" type="stmt"/>
|
|
165
|
-
<line num="99" count="30" type="stmt"/>
|
|
166
|
-
</file>
|
|
167
|
-
<file name="index.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/index.ts">
|
|
168
|
-
<metrics statements="7" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="7" coveredmethods="0"/>
|
|
169
|
-
<line num="1" count="0" type="stmt"/>
|
|
170
|
-
<line num="2" count="0" type="stmt"/>
|
|
171
|
-
<line num="3" count="0" type="stmt"/>
|
|
172
|
-
<line num="4" count="0" type="stmt"/>
|
|
173
|
-
<line num="5" count="0" type="stmt"/>
|
|
174
|
-
<line num="6" count="0" type="stmt"/>
|
|
175
|
-
<line num="7" count="0" type="stmt"/>
|
|
176
|
-
</file>
|
|
177
|
-
<file name="routes.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/routes.ts">
|
|
178
|
-
<metrics statements="22" coveredstatements="21" conditionals="8" coveredconditionals="6" methods="8" coveredmethods="8"/>
|
|
179
|
-
<line num="1" count="2" type="stmt"/>
|
|
180
|
-
<line num="3" count="2" type="stmt"/>
|
|
181
|
-
<line num="20" count="2" type="stmt"/>
|
|
182
|
-
<line num="21" count="1" type="stmt"/>
|
|
183
|
-
<line num="22" count="1" type="stmt"/>
|
|
184
|
-
<line num="58" count="1" type="stmt"/>
|
|
185
|
-
<line num="61" count="8" type="stmt"/>
|
|
186
|
-
<line num="62" count="8" type="stmt"/>
|
|
187
|
-
<line num="65" count="52" type="stmt"/>
|
|
188
|
-
<line num="67" count="52" type="stmt"/>
|
|
189
|
-
<line num="69" count="52" type="stmt"/>
|
|
190
|
-
<line num="73" count="139" type="stmt"/>
|
|
191
|
-
<line num="74" count="139" type="stmt"/>
|
|
192
|
-
<line num="75" count="139" type="cond" truecount="2" falsecount="0"/>
|
|
193
|
-
<line num="80" count="139" type="cond" truecount="2" falsecount="0"/>
|
|
194
|
-
<line num="82" count="139" type="cond" truecount="2" falsecount="0"/>
|
|
195
|
-
<line num="102" count="191" type="stmt"/>
|
|
196
|
-
<line num="103" count="191" type="cond" truecount="0" falsecount="1"/>
|
|
197
|
-
<line num="105" count="191" type="stmt"/>
|
|
198
|
-
<line num="106" count="191" type="cond" truecount="0" falsecount="1"/>
|
|
199
|
-
<line num="107" count="0" type="stmt"/>
|
|
200
|
-
<line num="110" count="191" type="stmt"/>
|
|
201
|
-
</file>
|
|
202
|
-
<file name="sailing.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/sailing.ts">
|
|
203
|
-
<metrics statements="13" coveredstatements="13" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="3"/>
|
|
204
|
-
<line num="1" count="2" type="stmt"/>
|
|
205
|
-
<line num="2" count="2" type="stmt"/>
|
|
206
|
-
<line num="4" count="2" type="stmt"/>
|
|
207
|
-
<line num="5" count="2" type="stmt"/>
|
|
208
|
-
<line num="6" count="2" type="stmt"/>
|
|
209
|
-
<line num="17" count="2" type="stmt"/>
|
|
210
|
-
<line num="23" count="3" type="stmt"/>
|
|
211
|
-
<line num="24" count="3" type="stmt"/>
|
|
212
|
-
<line num="26" count="3" type="stmt"/>
|
|
213
|
-
<line num="55" count="3" type="stmt"/>
|
|
214
|
-
<line num="59" count="9" type="stmt"/>
|
|
215
|
-
<line num="60" count="3" type="stmt"/>
|
|
216
|
-
<line num="70" count="3" type="stmt"/>
|
|
217
|
-
</file>
|
|
218
|
-
<file name="seasonalSchedule.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/seasonalSchedule.ts">
|
|
219
|
-
<metrics statements="16" coveredstatements="15" conditionals="8" coveredconditionals="7" methods="12" coveredmethods="11"/>
|
|
220
|
-
<line num="1" count="2" type="stmt"/>
|
|
221
|
-
<line num="3" count="2" type="stmt"/>
|
|
222
|
-
<line num="19" count="2" type="stmt"/>
|
|
223
|
-
<line num="20" count="2" type="stmt"/>
|
|
224
|
-
<line num="21" count="2" type="stmt"/>
|
|
225
|
-
<line num="44" count="340" type="stmt"/>
|
|
226
|
-
<line num="49" count="340" type="stmt"/>
|
|
227
|
-
<line num="58" count="112" type="cond" truecount="1" falsecount="1"/>
|
|
228
|
-
<line num="73" count="2" type="stmt"/>
|
|
229
|
-
<line num="78" count="14" type="cond" truecount="2" falsecount="0"/>
|
|
230
|
-
<line num="79" count="14" type="cond" truecount="2" falsecount="0"/>
|
|
231
|
-
<line num="81" count="14" type="stmt"/>
|
|
232
|
-
<line num="84" count="340" type="cond" truecount="2" falsecount="0"/>
|
|
233
|
-
<line num="85" count="112" type="stmt"/>
|
|
234
|
-
<line num="88" count="112" type="stmt"/>
|
|
235
|
-
<line num="89" count="0" type="stmt"/>
|
|
236
|
-
</file>
|
|
237
|
-
<file name="urls.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/urls.ts">
|
|
238
|
-
<metrics statements="27" coveredstatements="27" conditionals="4" coveredconditionals="3" methods="12" coveredmethods="12"/>
|
|
239
|
-
<line num="1" count="13" type="stmt"/>
|
|
240
|
-
<line num="2" count="13" type="stmt"/>
|
|
241
|
-
<line num="3" count="13" type="stmt"/>
|
|
242
|
-
<line num="5" count="165" type="stmt"/>
|
|
243
|
-
<line num="7" count="13" type="stmt"/>
|
|
244
|
-
<line num="12" count="21" type="stmt"/>
|
|
245
|
-
<line num="13" count="21" type="cond" truecount="2" falsecount="0"/>
|
|
246
|
-
<line num="15" count="16" type="stmt"/>
|
|
247
|
-
<line num="20" count="13" type="stmt"/>
|
|
248
|
-
<line num="26" count="10" type="stmt"/>
|
|
249
|
-
<line num="29" count="13" type="stmt"/>
|
|
250
|
-
<line num="30" count="2" type="stmt"/>
|
|
251
|
-
<line num="33" count="13" type="stmt"/>
|
|
252
|
-
<line num="38" count="5" type="stmt"/>
|
|
253
|
-
<line num="44" count="5" type="stmt"/>
|
|
254
|
-
<line num="50" count="13" type="stmt"/>
|
|
255
|
-
<line num="51" count="2" type="stmt"/>
|
|
256
|
-
<line num="54" count="13" type="stmt"/>
|
|
257
|
-
<line num="55" count="2" type="stmt"/>
|
|
258
|
-
<line num="60" count="13" type="stmt"/>
|
|
259
|
-
<line num="61" count="3" type="stmt"/>
|
|
260
|
-
<line num="69" count="3" type="cond" truecount="1" falsecount="0"/>
|
|
261
|
-
<line num="71" count="2" type="stmt"/>
|
|
262
|
-
<line num="72" count="2" type="cond" truecount="0" falsecount="1"/>
|
|
263
|
-
<line num="74" count="2" type="stmt"/>
|
|
264
|
-
<line num="80" count="13" type="stmt"/>
|
|
265
|
-
<line num="81" count="3" type="stmt"/>
|
|
266
|
-
</file>
|
|
267
|
-
<file name="utils.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/sources/bcf/utils.ts">
|
|
268
|
-
<metrics statements="22" coveredstatements="19" conditionals="5" coveredconditionals="5" methods="4" coveredmethods="4"/>
|
|
269
|
-
<line num="1" count="14" type="stmt"/>
|
|
270
|
-
<line num="2" count="14" type="stmt"/>
|
|
271
|
-
<line num="4" count="14" type="stmt"/>
|
|
272
|
-
<line num="5" count="14" type="stmt"/>
|
|
273
|
-
<line num="6" count="14" type="stmt"/>
|
|
274
|
-
<line num="13" count="14" type="stmt"/>
|
|
275
|
-
<line num="14" count="17" type="stmt"/>
|
|
276
|
-
<line num="18" count="17" type="stmt"/>
|
|
277
|
-
<line num="19" count="17" type="cond" truecount="1" falsecount="0"/>
|
|
278
|
-
<line num="21" count="0" type="stmt"/>
|
|
279
|
-
<line num="24" count="14" type="stmt"/>
|
|
280
|
-
<line num="27" count="5" type="stmt"/>
|
|
281
|
-
<line num="28" count="5" type="cond" truecount="1" falsecount="0"/>
|
|
282
|
-
<line num="30" count="0" type="stmt"/>
|
|
283
|
-
<line num="33" count="14" type="stmt"/>
|
|
284
|
-
<line num="36" count="15" type="stmt"/>
|
|
285
|
-
<line num="37" count="15" type="cond" truecount="1" falsecount="0"/>
|
|
286
|
-
<line num="39" count="0" type="stmt"/>
|
|
287
|
-
<line num="42" count="14" type="stmt"/>
|
|
288
|
-
<line num="43" count="5" type="stmt"/>
|
|
289
|
-
<line num="44" count="5" type="cond" truecount="2" falsecount="0"/>
|
|
290
|
-
<line num="46" count="5" type="stmt"/>
|
|
291
|
-
</file>
|
|
292
|
-
</package>
|
|
293
|
-
<package name="src.lib.test">
|
|
294
|
-
<metrics statements="12" coveredstatements="5" conditionals="4" coveredconditionals="0" methods="4" coveredmethods="1"/>
|
|
295
|
-
<file name="jest-conditional.ts" path="/Users/pjs/src/github.com/patsissons/scrapemyferry/src/lib/test/jest-conditional.ts">
|
|
296
|
-
<metrics statements="12" coveredstatements="5" conditionals="4" coveredconditionals="0" methods="4" coveredmethods="1"/>
|
|
297
|
-
<line num="22" count="15" type="stmt"/>
|
|
298
|
-
<line num="27" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
299
|
-
<line num="28" count="0" type="stmt"/>
|
|
300
|
-
<line num="31" count="15" type="stmt"/>
|
|
301
|
-
<line num="36" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
302
|
-
<line num="37" count="0" type="stmt"/>
|
|
303
|
-
<line num="41" count="15" type="stmt"/>
|
|
304
|
-
<line num="47" count="6" type="cond" truecount="0" falsecount="1"/>
|
|
305
|
-
<line num="48" count="0" type="stmt"/>
|
|
306
|
-
<line num="51" count="15" type="stmt"/>
|
|
307
|
-
<line num="57" count="0" type="cond" truecount="0" falsecount="1"/>
|
|
308
|
-
<line num="58" count="0" type="stmt"/>
|
|
309
|
-
</file>
|
|
310
|
-
</package>
|
|
311
|
-
</project>
|
|
312
|
-
</coverage>
|