universal-parcel-scraper 0.976.0-main.5284 → 0.976.2-main.5286
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/browser/scraper.js +2 -2
- package/dist/carriers/geodis-pl/status.js +1 -0
- package/dist/carriers/geodis-pl/statuses.json +1 -1
- package/dist/carriers/hermes-de/status.js +2 -0
- package/dist/carriers/hermes-de/statuses.json +7 -0
- package/dist/carriers/india-post/app.js +7 -2
- package/dist/carriers/jrt/statuses.json +27 -0
- package/dist/core/status/language.js +7 -3
- package/dist/providers/parcelsapp/adapter.js +12 -0
- package/dist/server/openapi.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -163,7 +163,7 @@ the command line's `track --source ParcelsApp` does the same.
|
|
|
163
163
|
<!-- GENERATED:stages -->
|
|
164
164
|
<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">
|
|
165
165
|
|
|
166
|
-
The carrier folders record 19,
|
|
166
|
+
The carrier folders record 19,046 such statuses, each filed under one stage.
|
|
167
167
|
<!-- /GENERATED:stages -->
|
|
168
168
|
|
|
169
169
|
Wording nobody recorded yet goes through a classifier that reads seven European languages.
|
package/dist/browser/scraper.js
CHANGED
|
@@ -45529,7 +45529,7 @@ function cu(e) {
|
|
|
45529
45529
|
if (/^your parcel is in the air and is heading your way$|^your parcel's left the transfer country and is back on the move$|^touchdown! your parcel has landed$|^collected from the airline for processing$|^your parcel's on an interstate journey\. we'll keep you updated as it travels$/.test(t)) return "in_transit";
|
|
45530
45530
|
if (/^it's happening, your parcel will be delivered today\. get ready$|^parcel out for final mile carrier delivery$/.test(t)) return "out_for_delivery";
|
|
45531
45531
|
if (/^parcel unsafe to leave at address$/.test(t)) return "failed_attempt";
|
|
45532
|
-
if (/^due to be delivered today(?: by\b.*)?$/.test(t)) return "out_for_delivery";
|
|
45532
|
+
if (/^due (?:to be delivered|for delivery) today(?: by\b.*)?$/.test(t)) return "out_for_delivery";
|
|
45533
45533
|
if (/^your shipment (?:\d{7,} )?is due to be delivered on (?:mon|tues|wednes|thurs|fri|satur|sun)day \d{2}(?:st|nd|rd|th) [a-z]+ \d{4}$/.test(t)) return "in_transit";
|
|
45534
45534
|
if (/^the item is expected to be delivered today\.?$|^(?:the )?parcel is expected to be delivered during the day\.?$/.test(t)) return "out_for_delivery";
|
|
45535
45535
|
let n = Sl(t);
|
|
@@ -45597,7 +45597,7 @@ function cu(e) {
|
|
|
45597
45597
|
if (/^acceptance of the (?:package|parcel) at the delivery branch abroad$/.test(t)) return "in_transit";
|
|
45598
45598
|
if (/^acceptance of the (?:package|parcel) at the pick ?up point$/.test(t)) return "ready_for_pickup";
|
|
45599
45599
|
if (/^(?:package|parcel) received (?:&|and) scanned at (?:the )?carrier's domestic warehouse$/.test(t) || /^(?:the )?goods (?:arrive|arrived|have arrived) at (?:the )?receiving point$/.test(t) || /(?<!\b(?:no|nao) )\badmitid[oa]s?\b|\badmision (?:en origen|pais de origen)\b/.test(t) || /^aceite(?:\.|$)|\b(?:envio|objeto|objecto|encomenda|remessa) foi aceite\b/.test(t)) return "accepted";
|
|
45600
|
-
if (/\bcross ?dock(?:ed|ing)?\b|\bready for outbound\b|^(?:(?:item|parcel|package|shipment) )?inbound scan(?:ned|ning)?\b|\b(?:un)?bagg(?:ed|ing)\b|\bmaster (?:air ?way ?bill|awb)(?: (?:number|no))? (?:received|assigned|allocated)\b|\bhand ?over to (?:the |an )?(?:airline|air carrier)\b|^(?:(?:the |your )?(?:item|parcel|package|shipment) )?(?:has )?left (?:the|our) warehouse$|\b(?:flight|leg)\b[^.;]*\b(?:is taking off|took off|has taken off|landed)\b|\bflight (?:take ?off|landing)\b|^(?:initial|final) landing$|\bcargo tally in the supervised warehouse\b|\bprepared for (?:the )?last[- ]mile hand ?over\b/.test(t) || /^(?:the |your )?(?:parcel|package|shipment|item) is (?:now )?at (?:the |a )?distribution cent(?:er|re)$/.test(t) || /^l'envoi est dans le reseau de livraison local$/.test(t) || /^there (?:has|have) been (?:a |an )?(?:slight |short |small |unexpected )?delay (?:with|to|in) (?:your |the )?(?:delivery|parcel|package|shipment|order)\.?$/.test(t) || /transit|\bline ?haul\b|en route|on (?:its|the) way|\bfacility\b|airport|\bleaving\b|\bdispatched\b|^delay(?:ed)?$|received by (?:the )?(?:local )?(?:delivery|logistics) company|\btransfer to (?:the |a |an )?(?:local |destination )?(?:acting |delivery |logistics |courier )?(?:company|agent|carrier|partner)\b|received by (?:postnl|uniuni)\b|notification.*sent to the recipient|delivery option requested|instruction de livraison recue|cambio (?:delle )?disposizioni di consegna|expedie (?:depuis|du|de)\b|acheminement|unterwegs|\bin viaggio\b|\bw drodze\b|\bonderweg\b|transport|trasport|arriv|depart|processed|processing completed|processing at (?:the )?(?:origin |destination )?branch\b|\breceipt of (?:the )?(?:package|parcel|shipment) at (?:the )?dpd branch\b|sorted|sorting|\btri\b|\btriee?s?\b|traitement|traite|sortier|bearbeitet|bearbeitung|elaborat|elaborazion|smistat|parcel cent(?:er|re)|delivery cent(?:er|re)|centre.*(?:colis|distribution)|paketzentrum|verteilzentrum|centro.*(?:pacchi|distribuzione)|depot|import scan|scan.*import|importscan|scansione.*import|delivery.*delayed|livraison.*(?:retard|report)|zustellung.*verzogert|consegna.*ritard|transferred|transfere|weitergeleitet|inoltrato|left.*(?:point|center)|quitte|verlassen|raggiunto|close bag|fermeture du sac|sack.*geschlossen|chiusura.*sacco|scanned into|scanne dans|eingescannt|scansionat|\b(?:un)?loaded\b|^(?:item|parcel|shipment) distributed$|charg.*vehicule de transport|transportfahrzeug.*geladen|caric.*veicolo.*trasporto/.test(t) || /^enviad[oa]$|\bclasificad[oa]s?\b|\bclasificacion\b|\ben ruta\b|\ben camino\b|\bcargad[oa]s? en (?:el )?vehiculo\b|\bllegad[oa]s? (?:a|al|en)\b|\bllegada (?:a|al|en|de)\b|\bha llegado\b|\bllego (?:a|al)\b|\bsalida (?:de|del|desde)\b|\b(?:ha )?salido (?:de|del)\b|\bsalio (?:de|del)\b|\ben destino\b|\b(?:agencia|delegacion|plataforma|oficina|franquicia) (?:de )?destino\b|\b(?:unidad|centro|oficina|delegacion|base|agencia|plataforma) de reparto\b|\bcentro (?:de )?(?:clasificacion|distribucion|tratamiento|logistico|operaciones|operativo)\b|\blectura\b|\bleid[oa]s?\b|\brecepcionad[oa]s?\b|\bprocesad[oa]s?\b|\bexpedid[oa]s?\b|\btriagem\b|\btriad[oa]s?\b|\bem tratamento\b|\btratad[oa]s?\b|\bcentro (?:de )?(?:distribuicao|tratamento|triagem|operacional)\b|\bchegad[ao] (?:a|ao|no|na|em)\b|\bchegou (?:a|ao|no|na|em)\b|\bsaida (?:do|da|de|dos|das)\b|\bsaiu (?:do|da|de|dos|das)\b|\bem rota\b|\ba caminho\b|\bencaminhad[oa]s?\b|\b(?:em )?transferencia\b|\btransferid[oa]s?\b|\bprocessad[oa]s?\b|\brecebid[oa] (?:no|na|em) (?:centro|armazem|unidade|plataforma)\b|\brecibid[oa] en (?:el |la |nuestr[oa] )?(?:almacen|centro|delegacion|plataforma|hub|agencia)\b/.test(t)) return "in_transit";
|
|
45600
|
+
if (/\bcross ?dock(?:ed|ing)?\b|\bready for outbound\b|^(?:(?:item|parcel|package|shipment) )?inbound scan(?:ned|ning)?\b|\b(?:un)?bagg(?:ed|ing)\b|\bmaster (?:air ?way ?bill|awb)(?: (?:number|no))? (?:received|assigned|allocated)\b|\bhand ?over to (?:the |an )?(?:airline|air carrier)\b|^(?:(?:the |your )?(?:item|parcel|package|shipment) )?(?:has )?left (?:the|our) warehouse$|\b(?:flight|leg)\b[^.;]*\b(?:is taking off|took off|has taken off|landed)\b|\bflight (?:take ?off|landing)\b|^(?:initial|final) landing$|\bcargo tally in the supervised warehouse\b|\bprepared for (?:the )?last[- ]mile hand ?over\b/.test(t) || /^(?:the )?noa (?:has been |was )?received$|^noa-notification of arrival\b/.test(t) || /^(?:the |your )?(?:parcel|package|shipment|item) is (?:now )?at (?:the |a )?distribution cent(?:er|re)$/.test(t) || /^l'envoi est dans le reseau de livraison local$/.test(t) || /^there (?:has|have) been (?:a |an )?(?:slight |short |small |unexpected )?delay (?:with|to|in) (?:your |the )?(?:delivery|parcel|package|shipment|order)\.?$/.test(t) || /transit|\bline ?haul\b|en route|on (?:its|the) way|\bfacility\b|airport|\bleaving\b|\bdispatched\b|^delay(?:ed)?$|received by (?:the )?(?:local )?(?:delivery|logistics) company|\btransfer to (?:the |a |an )?(?:local |destination )?(?:acting |delivery |logistics |courier )?(?:company|agent|carrier|partner)\b|received by (?:postnl|uniuni)\b|notification.*sent to the recipient|delivery option requested|instruction de livraison recue|cambio (?:delle )?disposizioni di consegna|expedie (?:depuis|du|de)\b|acheminement|unterwegs|\bin viaggio\b|\bw drodze\b|\bonderweg\b|transport|trasport|arriv|depart|processed|processing completed|processing at (?:the )?(?:origin |destination )?branch\b|\breceipt of (?:the )?(?:package|parcel|shipment) at (?:the )?dpd branch\b|sorted|sorting|\btri\b|\btriee?s?\b|traitement|traite|sortier|bearbeitet|bearbeitung|elaborat|elaborazion|smistat|parcel cent(?:er|re)|delivery cent(?:er|re)|centre.*(?:colis|distribution)|paketzentrum|verteilzentrum|centro.*(?:pacchi|distribuzione)|depot|import scan|scan.*import|importscan|scansione.*import|delivery.*delayed|livraison.*(?:retard|report)|zustellung.*verzogert|consegna.*ritard|transferred|transfere|weitergeleitet|inoltrato|left.*(?:point|center)|quitte|verlassen|raggiunto|close bag|fermeture du sac|sack.*geschlossen|chiusura.*sacco|scanned into|scanne dans|eingescannt|scansionat|\b(?:un)?loaded\b|^(?:item|parcel|shipment) distributed$|charg.*vehicule de transport|transportfahrzeug.*geladen|caric.*veicolo.*trasporto/.test(t) || /^enviad[oa]$|\bclasificad[oa]s?\b|\bclasificacion\b|\ben ruta\b|\ben camino\b|\bcargad[oa]s? en (?:el )?vehiculo\b|\bllegad[oa]s? (?:a|al|en)\b|\bllegada (?:a|al|en|de)\b|\bha llegado\b|\bllego (?:a|al)\b|\bsalida (?:de|del|desde)\b|\b(?:ha )?salido (?:de|del)\b|\bsalio (?:de|del)\b|\ben destino\b|\b(?:agencia|delegacion|plataforma|oficina|franquicia) (?:de )?destino\b|\b(?:unidad|centro|oficina|delegacion|base|agencia|plataforma) de reparto\b|\bcentro (?:de )?(?:clasificacion|distribucion|tratamiento|logistico|operaciones|operativo)\b|\blectura\b|\bleid[oa]s?\b|\brecepcionad[oa]s?\b|\bprocesad[oa]s?\b|\bexpedid[oa]s?\b|\btriagem\b|\btriad[oa]s?\b|\bem tratamento\b|\btratad[oa]s?\b|\bcentro (?:de )?(?:distribuicao|tratamento|triagem|operacional)\b|\bchegad[ao] (?:a|ao|no|na|em)\b|\bchegou (?:a|ao|no|na|em)\b|\bsaida (?:do|da|de|dos|das)\b|\bsaiu (?:do|da|de|dos|das)\b|\bem rota\b|\ba caminho\b|\bencaminhad[oa]s?\b|\b(?:em )?transferencia\b|\btransferid[oa]s?\b|\bprocessad[oa]s?\b|\brecebid[oa] (?:no|na|em) (?:centro|armazem|unidade|plataforma)\b|\brecibid[oa] en (?:el |la |nuestr[oa] )?(?:almacen|centro|delegacion|plataforma|hub|agencia)\b/.test(t)) return "in_transit";
|
|
45601
45601
|
if (/^(?:приинято|принято)$/.test(t)) return "accepted";
|
|
45602
45602
|
if (zl.test(t)) return "in_transit";
|
|
45603
45603
|
}
|
|
@@ -33,6 +33,7 @@ const CODES = new Map([
|
|
|
33
33
|
['15', 'accepted'],
|
|
34
34
|
// The driver could not collect the shipment from the sender.
|
|
35
35
|
['14', 'exception'],
|
|
36
|
+
// A terminal's receipt from a driver: after the collection, or after a round that brought it back undelivered.
|
|
36
37
|
['20', 'in_transit'],
|
|
37
38
|
['30', 'in_transit'],
|
|
38
39
|
['40', 'in_transit'],
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{"code": "10", "wording": "Received from the sender", "language": "en", "stage": "accepted", "confirmedBy": "live"},
|
|
5
5
|
{"code": "15", "wording": "Collected (SMS)", "language": "en", "stage": "accepted", "confirmedBy": "portal", "note": "The collection from the sender, confirmed by text message."},
|
|
6
6
|
{"code": "14", "wording": "Failed collection (SMS)", "language": "en", "stage": "exception", "confirmedBy": "portal", "note": "The driver could not collect the shipment from the sender."},
|
|
7
|
-
{"code": "20", "wording": "Inbound Scan From Driver to Terminal", "language": "en", "stage": "in_transit", "confirmedBy": "live", "note": "
|
|
7
|
+
{"code": "20", "wording": "Inbound Scan From Driver to Terminal", "language": "en", "stage": "in_transit", "confirmedBy": "live", "note": "A terminal received the shipment from a driver: the collecting one after the collection, or the delivery terminal after a round that brought it back undelivered. Without an attempt code (65, 68) the round made no attempt: the shipment waits for another round."},
|
|
8
8
|
{"code": "30", "wording": "Outbound Scan from (Collection) Terminal to Line-haul", "language": "en", "stage": "in_transit", "confirmedBy": "live"},
|
|
9
9
|
{"code": "40", "wording": "Inbound Scan from Line-haul to (Delivery) Terminal", "language": "en", "stage": "in_transit", "confirmedBy": "live"},
|
|
10
10
|
{"code": "50", "wording": "Outbound for Delivery", "language": "en", "stage": "out_for_delivery", "confirmedBy": "portal"},
|
|
@@ -50,6 +50,8 @@ export const STATUSES = {
|
|
|
50
50
|
DELIVERY_FAILED_NOT_MET_1X: milestone('failed_attempt', 'exception', 'Recipient not met; another attempt follows'),
|
|
51
51
|
DELIVERY_FAILED_NOT_MET_2X: milestone('failed_attempt', 'exception', 'Recipient not met a second time; another attempt follows'),
|
|
52
52
|
DELIVERY_FAILED_NOT_MET_3X: milestone('failed_attempt', 'exception', 'Recipient not met three times; book a delivery within 10 days or the parcel goes back'),
|
|
53
|
+
// The last round: the parcel goes back to the sender, whose return scan follows.
|
|
54
|
+
DELIVERY_FAILED_NOT_MET_4X: milestone('failed_attempt', 'exception', 'Recipient not met; the parcel goes back to the sender'),
|
|
53
55
|
INTERNATIONAL_DELIVERY_FAILED: milestone('failed_attempt', 'exception', 'Delivery attempt unsuccessful'),
|
|
54
56
|
INTERNATIONAL_DELIVERY_FAILED_ADDRESS: milestone('failed_attempt', 'exception', 'Delivery address not found'),
|
|
55
57
|
INTERNATIONAL_PUDO_READY_FOR_COLLECTION: milestone('ready_for_pickup', 'out_for_delivery', 'Ready for collection at a parcel shop'),
|
|
@@ -252,6 +252,13 @@
|
|
|
252
252
|
"firstSeen": "2026-11-05",
|
|
253
253
|
"note": "The third attempt without meeting the recipient, who has 10 days to book a delivery before the parcel goes back to the sender"
|
|
254
254
|
},
|
|
255
|
+
{
|
|
256
|
+
"code": "DELIVERY_FAILED_NOT_MET_4X",
|
|
257
|
+
"stage": "failed_attempt",
|
|
258
|
+
"confirmedBy": "live",
|
|
259
|
+
"firstSeen": "2026-11-05",
|
|
260
|
+
"note": "The fourth round without meeting the recipient, after which the parcel goes back to the sender"
|
|
261
|
+
},
|
|
255
262
|
{
|
|
256
263
|
"code": "NOT_DELIVERABLE",
|
|
257
264
|
"stage": "exception",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
// MySpeedPost
|
|
1
|
+
// MySpeedPost rewords a scan, and can restate it under another event_type, at the same
|
|
2
|
+
// second and office: "Item bagged" (ItemBagged) as "Bag Closed" (BagOpened), "Item
|
|
3
|
+
// Dispatched" as "Bag Dispatched". A reply never holds two scans at one second and office,
|
|
4
|
+
// so the scan at that second and office, the only one both ways, is the stored one.
|
|
2
5
|
// Scans abroad were read on India's clock until October 2026 and now show the
|
|
3
6
|
// destination's offset, unless a reply lacks what places them abroad.
|
|
4
7
|
export const sameInstantIdentityPolicy = {
|
|
5
|
-
sourceCarrierId: 'india-post', storedSources: ['india-post'], requireProviderCode:
|
|
8
|
+
sourceCarrierId: 'india-post', storedSources: ['india-post'], requireProviderCode: false, matchEachScan: true,
|
|
9
|
+
matches: (incoming, stored) => incoming.location.trim() === stored.location.trim(),
|
|
10
|
+
relabelledFrom: 'Asia/Kolkata',
|
|
6
11
|
};
|
|
@@ -807,6 +807,33 @@
|
|
|
807
807
|
"firstSeen": "2026-11-04",
|
|
808
808
|
"note": "On JRT's road line to Europe, the container leaving for Xinjiang, the way out of China, after the Shenzhen distribution center."
|
|
809
809
|
},
|
|
810
|
+
{
|
|
811
|
+
"wording": "已抵达新疆,换装/报关,待出境",
|
|
812
|
+
"language": "zh",
|
|
813
|
+
"english": "Arrived in Xinjiang for transloading and export declaration, waiting to leave China",
|
|
814
|
+
"stage": "in_transit",
|
|
815
|
+
"confirmedBy": "live",
|
|
816
|
+
"firstSeen": "2026-11-05",
|
|
817
|
+
"note": "On JRT's road line to Europe, after the container's departure for Xinjiang and before the border exit."
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"wording": "因哈萨克斯坦拥堵,外车入境新疆拥堵缓慢,在等待外车倒装后报关出境。",
|
|
821
|
+
"language": "zh",
|
|
822
|
+
"english": "Congestion in Kazakhstan is slowing foreign trucks into Xinjiang; the parcel will be declared for export once it is reloaded onto one",
|
|
823
|
+
"stage": "in_transit",
|
|
824
|
+
"confirmedBy": "live",
|
|
825
|
+
"firstSeen": "2026-11-05",
|
|
826
|
+
"note": "A delay at the Xinjiang border on JRT's road line to Europe; the exit from China follows."
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"wording": "已出境,哈萨克斯坦阿拉木图",
|
|
830
|
+
"language": "zh",
|
|
831
|
+
"english": "Left China, Almaty, Kazakhstan",
|
|
832
|
+
"stage": "in_transit",
|
|
833
|
+
"confirmedBy": "live",
|
|
834
|
+
"firstSeen": "2026-11-05",
|
|
835
|
+
"note": "The border exit on JRT's road line to Europe, naming the first town after it."
|
|
836
|
+
},
|
|
810
837
|
{
|
|
811
838
|
"wording": "Shipping Label Created",
|
|
812
839
|
"language": "en",
|
|
@@ -260,9 +260,9 @@ export function trackingLanguageStage(description) {
|
|
|
260
260
|
return 'out_for_delivery';
|
|
261
261
|
if (/^parcel unsafe to leave at address$/.test(text))
|
|
262
262
|
return 'failed_attempt';
|
|
263
|
-
// Royal Mail's delivery-round scans (EVGPD, EVKPD), as universal providers relay them
|
|
264
|
-
// delivery today is its out-for-delivery scan, not a forecast.
|
|
265
|
-
if (/^due to be delivered today(?: by\b.*)?$/.test(text))
|
|
263
|
+
// Royal Mail's delivery-round scans (EVGPD, EVKPD), as universal providers relay them, Postal
|
|
264
|
+
// Ninja as "Due for delivery today": the delivery today is its out-for-delivery scan, not a forecast.
|
|
265
|
+
if (/^due (?:to be delivered|for delivery) today(?: by\b.*)?$/.test(text))
|
|
266
266
|
return 'out_for_delivery';
|
|
267
267
|
// DHL eCommerce UK's row for the day it plans to deliver on, which follows the collection, as
|
|
268
268
|
// universal providers relay it with the shipment's number: the carrier's map reads it in transit.
|
|
@@ -716,6 +716,10 @@ export function trackingLanguageStage(description) {
|
|
|
716
716
|
// the parcel on.
|
|
717
717
|
if (/\bcross ?dock(?:ed|ing)?\b|\bready for outbound\b|^(?:(?:item|parcel|package|shipment) )?inbound scan(?:ned|ning)?\b|\b(?:un)?bagg(?:ed|ing)\b|\bmaster (?:air ?way ?bill|awb)(?: (?:number|no))? (?:received|assigned|allocated)\b|\bhand ?over to (?:the |an )?(?:airline|air carrier)\b|^(?:(?:the |your )?(?:item|parcel|package|shipment) )?(?:has )?left (?:the|our) warehouse$|\b(?:flight|leg)\b[^.;]*\b(?:is taking off|took off|has taken off|landed)\b|\bflight (?:take ?off|landing)\b|^(?:initial|final) landing$|\bcargo tally in the supervised warehouse\b|\bprepared for (?:the )?last[- ]mile hand ?over\b/.test(text))
|
|
718
718
|
return 'in_transit';
|
|
719
|
+
// The airline's notice of arrival (NOA) reaching the destination agent, after the landing and
|
|
720
|
+
// before clearance, as Shouwu, JRT and the ground handlers word it.
|
|
721
|
+
if (/^(?:the )?noa (?:has been |was )?received$|^noa-notification of arrival\b/.test(text))
|
|
722
|
+
return 'in_transit';
|
|
719
723
|
// A linehaul is the trunk haul between hubs, whatever was handed over.
|
|
720
724
|
// A parcel at a distribution centre, the whole scan, as Lietuvos paštas words it. Other scans naming
|
|
721
725
|
// such a centre, a courier's origin scan or a retailer's order sent to its store, say less.
|
|
@@ -22,6 +22,7 @@ import { countryName, militaryPostOffice } from '../../places/trackingLocation.j
|
|
|
22
22
|
import { hasSeveralClocks, keepsZone, mainZone } from '../../places/zones.js';
|
|
23
23
|
import { captureFailure, capturedBodies, loadCapture } from '../shared/capture.js';
|
|
24
24
|
import { CAINIAO_CHINA_LEG, CAINIAO_CHINA_ZONE } from '../../carriers/aliexpress/clock.js';
|
|
25
|
+
import { chinaPostEnglish, chinaPostLabelPlace } from '../../carriers/china-post/status.js';
|
|
25
26
|
import { correosOriginZone } from '../../carriers/correos-spain/clock.js';
|
|
26
27
|
import { cttSiteZone, portugalZone } from '../../carriers/ctt/clock.js';
|
|
27
28
|
import { DHLINK_RECORD_ZONE, usClockCopy } from '../../carriers/dhlink/clock.js';
|
|
@@ -1762,6 +1763,17 @@ function parseHistory(payload, trackingNumber, timezone = null, readAt = Date.no
|
|
|
1762
1763
|
const location = scan?.location ?? reportedPlace(raw.location);
|
|
1763
1764
|
if (location && !/^Type de livraison\s*:/i.test(location))
|
|
1764
1765
|
parsed.location = location;
|
|
1766
|
+
// China Post words its labels in Chinese only, also those it gives the destination post's scans:
|
|
1767
|
+
// they show in English where it is known, staged as the Chinese was, with the place left to the
|
|
1768
|
+
// location, or taken from the label's 【】 where none is given, as 17TRACK's copies of them are.
|
|
1769
|
+
const english = !scan && typeof name === 'string' && carrierIdFromName(name) === 'china-post'
|
|
1770
|
+
&& /\p{Script=Han}/u.test(parsed.description ?? '') ? chinaPostEnglish(parsed.description) : undefined;
|
|
1771
|
+
if (english) {
|
|
1772
|
+
const named = parsed.location ? '' : reportedPlace(chinaPostLabelPlace(parsed.description) ?? '');
|
|
1773
|
+
parsed.description = english;
|
|
1774
|
+
if (named)
|
|
1775
|
+
parsed.location = named;
|
|
1776
|
+
}
|
|
1765
1777
|
events.push(parsed);
|
|
1766
1778
|
carried.push({ event: parsed, carrier: nameKey(name) });
|
|
1767
1779
|
scanCarriers.add(name);
|
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.976.
|
|
3
|
+
"version": "0.976.2-main.5286",
|
|
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",
|