universal-parcel-scraper 0.776.1-main.4147 → 0.776.2-main.4151
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/README.md +1 -1
- package/dist/carriers/correios-br/status.js +2 -0
- package/dist/carriers/correios-br/statuses.json +1 -0
- package/dist/carriers/dpd-uk/identity.js +9 -3
- package/dist/carriers/dpd-uk/parser.js +1 -0
- package/dist/carriers/dpd-uk/statuses.json +1 -0
- package/dist/providers/shared/result.js +6 -0
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,7 +161,7 @@ the command line's `track --source ParcelsApp` does the same.
|
|
|
161
161
|
<!-- GENERATED:stages -->
|
|
162
162
|
<img src="docs/assets/stages.svg" alt="DHL: Die Sendung wurde in das Zustellfahrzeug geladen.; Mondial Relay: En cours de livraison; Correios Brazil: Objeto saiu para entrega ao destinatário; Correos Express: EN REPARTO; Yamato Transport: 配達中; La Poste / Colissimo: DISTOU. All are filed under out_for_delivery." width="760">
|
|
163
163
|
|
|
164
|
-
The carrier folders record 17,
|
|
164
|
+
The carrier folders record 17,129 such statuses, each filed under one stage.
|
|
165
165
|
<!-- /GENERATED:stages -->
|
|
166
166
|
|
|
167
167
|
Wording nobody recorded yet goes through a classifier that reads seven European languages.
|
|
@@ -30,6 +30,8 @@ const codes = {
|
|
|
30
30
|
'PAR/21': { status: 'in_transit', stage: 'customs' },
|
|
31
31
|
// The import waits for the recipient's tax number before customs can clear it.
|
|
32
32
|
'FC/16': { status: 'in_transit', stage: 'customs' },
|
|
33
|
+
// The import waits for customs to settle the product's classification code.
|
|
34
|
+
'FC/40': { status: 'in_transit', stage: 'customs' },
|
|
33
35
|
'PAR/24': { status: 'exception', stage: 'returned' },
|
|
34
36
|
};
|
|
35
37
|
export function classifyCorreiosStatus(code) {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
{ "code": "PAR/07", "wording": "Análise concluída - importação autorizada", "language": "pt", "stage": "in_transit", "confirmedBy": "live" },
|
|
15
15
|
{ "code": "PAR/21", "wording": "Informações enviadas para análise da autoridade aduaneira/órgãos anuentes", "language": "pt", "stage": "customs", "confirmedBy": "live" },
|
|
16
16
|
{ "code": "FC/16", "wording": "Necessidade de informar CPF/CNPJ do destinatário", "language": "pt", "stage": "customs", "confirmedBy": "live", "note": "The import waits for the recipient's tax number (CPF or CNPJ) before customs can clear it." },
|
|
17
|
+
{ "code": "FC/40", "wording": "Objeto em processo de identificação do código de classificação do produto", "language": "pt", "stage": "customs", "confirmedBy": "live", "note": "The import waits for customs to settle the product's classification code, after Correios received the item." },
|
|
17
18
|
{ "code": "BDI/01", "wording": "Objeto entregue ao destinatário", "language": "pt", "stage": "delivered", "confirmedBy": "live" },
|
|
18
19
|
{ "code": "BDE/10", "wording": "Objeto não entregue - cliente mudou-se", "language": "pt", "stage": "failed_attempt", "confirmedBy": "live" },
|
|
19
20
|
{ "code": "BDE/20", "wording": "Objeto não entregue - carteiro não atendido", "language": "pt", "stage": "failed_attempt", "confirmedBy": "live" },
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { dpdUkWording, withoutDriverName } from './wording.js';
|
|
2
|
-
|
|
2
|
+
// DPD UK rewords a depot scan as the parcel moves on: it has arrived at the depot, it is there
|
|
3
|
+
// ready for delivery, then it is at the depot. The three are one scan.
|
|
4
|
+
const DEPOT = /^your parcel (?:has arrived at|is at) our depot(?: ready for delivery)?$/;
|
|
5
|
+
function wording(scan) {
|
|
6
|
+
const text = dpdUkWording(withoutDriverName(scan.description));
|
|
7
|
+
return DEPOT.test(text) ? 'your parcel is at our depot' : text;
|
|
8
|
+
}
|
|
3
9
|
/** One scan, by its wording and place. DPD UK's scans have no code. */
|
|
4
10
|
function sameScan(incoming, stored) {
|
|
5
11
|
return wording(incoming) !== '' && wording(incoming) === wording(stored) && incoming.location.trim() === stored.location.trim();
|
|
6
12
|
}
|
|
7
|
-
// The round's notice drops the hour it gave for the delivery once the round is over,
|
|
8
|
-
// earlier releases kept the driver's name a scan gives. The scan keeps its row
|
|
13
|
+
// The round's notice drops the hour it gave for the delivery once the round is over, a depot
|
|
14
|
+
// scan is reworded, and earlier releases kept the driver's name a scan gives. The scan keeps its row.
|
|
9
15
|
export const sameInstantIdentityPolicy = {
|
|
10
16
|
sourceCarrierId: 'dpd-uk', storedSources: ['dpd-uk'], requireProviderCode: false, matchEachScan: true, matches: sameScan,
|
|
11
17
|
};
|
|
@@ -57,6 +57,7 @@ const VERIFIED_WORDING = {
|
|
|
57
57
|
'the parcel is on the vehicle for delivery': 'out_for_delivery',
|
|
58
58
|
'your parcel is at our depot': 'in_transit',
|
|
59
59
|
'your parcel has arrived at our depot': 'in_transit',
|
|
60
|
+
'your parcel is at our depot ready for delivery': 'in_transit',
|
|
60
61
|
"your parcel has left our sortation facility and is on it's onwards journey": 'in_transit',
|
|
61
62
|
'the parcel has arrived at the delivery depot': 'in_transit',
|
|
62
63
|
'the parcel is in transit to its final destination': 'in_transit',
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
{ "wording": "We have your parcel and it's on its way to you", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-08" },
|
|
9
9
|
{ "wording": "Your parcel is at our depot", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-08" },
|
|
10
10
|
{ "wording": "Your parcel has arrived at our depot", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-08" },
|
|
11
|
+
{ "wording": "Your parcel is at our depot ready for delivery", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-28", "note": "A depot scan as DPD rewords it once the parcel is ready for its round; later it reads \"Your parcel is at our depot\"." },
|
|
11
12
|
{ "wording": "Your parcel has left our sortation facility and is on it's onwards journey", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-08", "note": "On a parcel leaving the UK." },
|
|
12
13
|
{ "wording": "The parcel is in transit to its final destination", "language": "en", "stage": "in_transit", "confirmedBy": "live", "firstSeen": "2026-10-08", "note": "The partner's wording on a parcel delivered abroad, as are the other entries starting with \"The parcel\"." },
|
|
13
14
|
{ "wording": "The parcel is undergoing customs clearance", "language": "en", "stage": "customs", "confirmedBy": "live", "firstSeen": "2026-10-08" },
|
|
@@ -246,6 +246,12 @@ function providerWordingStage(description) {
|
|
|
246
246
|
return 'registered';
|
|
247
247
|
if (/^export declaration in progress[.!]?$/i.test(value))
|
|
248
248
|
return 'customs';
|
|
249
|
+
// KTD's steps as ParcelsApp relays them: the first carrier's local warehouse taking the parcel in and
|
|
250
|
+
// sending it on to KTD's warehouse, the parcel leaving that, its export cleared and its flight taking off.
|
|
251
|
+
if (/^package received and scanned at the carrier['’]s local warehouse[.!]?$/i.test(value))
|
|
252
|
+
return 'accepted';
|
|
253
|
+
if (/^package leaves the carrier['’]s local warehouse[.!]?$|^your item has left the [a-z ]{1,40} warehouse[.!]?$|^export declaration completed[.!]?$|^take ?off[.!]?$/i.test(value))
|
|
254
|
+
return 'in_transit';
|
|
249
255
|
// MRW's own wording for a parcel left at one of its pickup points, relayed by a provider,
|
|
250
256
|
// and for its pickup from the sender still to come, as MRW's own map reads them.
|
|
251
257
|
if (/^depositado en punto mrw[.!]?$/i.test(value))
|
package/dist/server/openapi.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-parcel-scraper",
|
|
3
|
-
"version": "0.776.
|
|
3
|
+
"version": "0.776.2-main.4151",
|
|
4
4
|
"description": "Self-hosted parcel tracking: carrier detection, dedicated scrapers and optional universal providers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|