scrapemyferry 1.1.0 → 1.3.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/bin/scrapemyferry.js +0 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -15
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +2 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +3 -15
- package/dist/lib/index.js.map +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/cookiejar.d.ts +3 -0
- package/dist/lib/sources/bcf/cookiejar.d.ts.map +1 -0
- package/dist/lib/sources/bcf/cookiejar.js +16 -0
- package/dist/lib/sources/bcf/cookiejar.js.map +1 -0
- 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/dist/lib/sources/index.d.ts +1 -1
- package/dist/lib/sources/index.d.ts.map +1 -1
- package/dist/lib/sources/index.js +0 -15
- package/dist/lib/sources/index.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
package/bin/scrapemyferry.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { sourceForType } from './lib';
|
|
2
|
+
export type { CurrentConditions, CurrentConditionsBeta, DailySchedule, DailyScheduleSailing, Departures, Routes, Sailing, SeasonalSchedule, SeasonalScheduleSailing, Source, SourceConfig, } from './lib';
|
|
2
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,YAAY,GACb,MAAM,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.sourceForType = void 0;
|
|
4
|
+
var lib_1 = require("./lib");
|
|
5
|
+
Object.defineProperty(exports, "sourceForType", { enumerable: true, get: function () { return lib_1.sourceForType; } });
|
|
18
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6BAAqC;AAA5B,oGAAA,aAAa,OAAA"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import './setup';
|
|
2
|
-
export
|
|
2
|
+
export { sourceForType } from './sources';
|
|
3
|
+
export type { CurrentConditions, CurrentConditionsBeta, DailySchedule, DailyScheduleSailing, Departures, Routes, Sailing, SeasonalSchedule, SeasonalScheduleSailing, Source, SourceConfig, } from './sources';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAEhB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,YAAY,GACb,MAAM,WAAW,CAAA"}
|
package/dist/lib/index.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sourceForType = void 0;
|
|
17
4
|
require("./setup");
|
|
18
|
-
|
|
5
|
+
var sources_1 = require("./sources");
|
|
6
|
+
Object.defineProperty(exports, "sourceForType", { enumerable: true, get: function () { return sources_1.sourceForType; } });
|
|
19
7
|
//# sourceMappingURL=index.js.map
|
package/dist/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":";;;AAAA,mBAAgB;AAEhB,qCAAyC;AAAhC,wGAAA,aAAa,OAAA"}
|
|
@@ -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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookiejar.d.ts","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/cookiejar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,OAAO,CAAA;AAkB9D,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAGpE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapWithCookies = wrapWithCookies;
|
|
4
|
+
const http_1 = require("http-cookie-agent/http");
|
|
5
|
+
function requestInterceptor(config) {
|
|
6
|
+
if (!config.jar)
|
|
7
|
+
return config;
|
|
8
|
+
config.httpAgent = new http_1.HttpCookieAgent({ cookies: { jar: config.jar } });
|
|
9
|
+
config.httpsAgent = new http_1.HttpsCookieAgent({ cookies: { jar: config.jar } });
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
function wrapWithCookies(axios) {
|
|
13
|
+
axios.interceptors.request.use(requestInterceptor);
|
|
14
|
+
return axios;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=cookiejar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookiejar.js","sourceRoot":"","sources":["../../../../src/lib/sources/bcf/cookiejar.ts"],"names":[],"mappings":";;AAkBA,0CAGC;AApBD,iDAA0E;AAU1E,SAAS,kBAAkB,CAAC,MAAgC;IAC1D,IAAI,CAAC,MAAM,CAAC,GAAG;QAAE,OAAO,MAAM,CAAA;IAC9B,MAAM,CAAC,SAAS,GAAG,IAAI,sBAAe,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IACxE,MAAM,CAAC,UAAU,GAAG,IAAI,uBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAC1E,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAgB,eAAe,CAA0B,KAAQ;IAC/D,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,kBAA2B,CAAC,CAAA;IAC3D,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -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":"AAEA,OAAO,QAAQ,MAAM,WAAW,CAAA;AAOhC,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 Cheerio = __importStar(require("cheerio"));
|
|
33
|
+
const scrape_it_1 = __importDefault(require("scrape-it"));
|
|
34
|
+
const tough_cookie_1 = require("tough-cookie");
|
|
35
|
+
const config_1 = require("./config");
|
|
36
|
+
const cookiejar_1 = require("./cookiejar");
|
|
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, cookiejar_1.wrapWithCookies)(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,iDAAkC;AAClC,0DAAgC;AAChC,+CAAwC;AACxC,qCAAiC;AACjC,2CAA6C;AAE7C,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,2BAAe,EAC5B,eAAK,CAAC,MAAM,CAAC;QACX,GAAG;QACH,eAAe,EAAE,IAAI,EAAE,0CAA0C;KACzD,CAAC,CACZ,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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { sourceForType } from './source';
|
|
2
|
-
export
|
|
2
|
+
export type { CurrentConditions, CurrentConditionsBeta, DailySchedule, DailyScheduleSailing, Departures, Routes, Sailing, SeasonalSchedule, SeasonalScheduleSailing, Source, SourceConfig, } from './types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,MAAM,EACN,YAAY,GACb,MAAM,SAAS,CAAA"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.sourceForType = void 0;
|
|
18
4
|
var source_1 = require("./source");
|
|
19
5
|
Object.defineProperty(exports, "sourceForType", { enumerable: true, get: function () { return source_1.sourceForType; } });
|
|
20
|
-
__exportStar(require("./types"), exports);
|
|
21
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/sources/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/sources/index.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAA/B,uGAAA,aAAa,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scrapemyferry",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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
|
+
"cheerio": "^1.0.0",
|
|
25
27
|
"dayjs": "^1.11.13",
|
|
26
|
-
"
|
|
28
|
+
"http-cookie-agent": "^6",
|
|
29
|
+
"scrape-it": "^6.1.3",
|
|
30
|
+
"tough-cookie": "^5.1.2"
|
|
27
31
|
},
|
|
28
32
|
"devDependencies": {
|
|
29
33
|
"@types/jest": "^29.5.12",
|