universal-parcel-scraper 0.4.0-main.319 → 0.4.0-main.320

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 CHANGED
@@ -15,7 +15,7 @@ The engine behind [Peek](https://peektracker.com) ([GitHub](https://github.com/p
15
15
  <!-- GENERATED:summary -->
16
16
  **3,500+ carriers** through **85 dedicated adapters** and **5 universal fallbacks**
17
17
 
18
- <sub>105 catalog entries · 58 countries represented</sub>
18
+ <sub>106 catalog entries · 58 countries represented</sub>
19
19
  <!-- /GENERATED:summary -->
20
20
 
21
21
  [Try it](#try-it) · [Ways to run it](#ways-to-run-it) · [Benchmark](#benchmark) · [Carriers](carriers/) · [Add a carrier](CONTRIBUTING.md)
package/data/catalog.json CHANGED
@@ -193,7 +193,12 @@
193
193
  ]
194
194
  }
195
195
  ],
196
- "detectionRules": []
196
+ "detectionRules": [
197
+ {
198
+ "pattern": "^DOFR\\d{13}HD$",
199
+ "confidence": "high"
200
+ }
201
+ ]
197
202
  },
198
203
  "sunyou": {
199
204
  "displayName": "SunYou",
@@ -3969,5 +3974,30 @@
3969
3974
  }
3970
3975
  ],
3971
3976
  "detectionRules": []
3977
+ },
3978
+ "omgo": {
3979
+ "displayName": "OMGO",
3980
+ "color": "#8e8e93",
3981
+ "aliases": [
3982
+ "OMGO Express"
3983
+ ],
3984
+ "countries": [
3985
+ "CN"
3986
+ ],
3987
+ "selectable": true,
3988
+ "timezone": "UTC",
3989
+ "tracking": {
3990
+ "mode": "automatic",
3991
+ "adapter": "universal"
3992
+ },
3993
+ "canaryUrl": "https://omgoexpress.cn/",
3994
+ "trackingUrlTemplate": "https://omgoexpress.cn/",
3995
+ "linkRules": [],
3996
+ "detectionRules": [
3997
+ {
3998
+ "pattern": "^OMGO\\d{13}$",
3999
+ "confidence": "high"
4000
+ }
4001
+ ]
3972
4002
  }
3973
4003
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "catalog": 105,
2
+ "catalog": 106,
3
3
  "activeAdapters": 85,
4
4
  "countries": 58,
5
5
  "referenceCarriers": 100,
@@ -3613,6 +3613,26 @@
3613
3613
  "confidence": "none",
3614
3614
  "candidates": []
3615
3615
  },
3616
+ {
3617
+ "input": "DOFR0000000000001HD",
3618
+ "carrier": "aliexpress",
3619
+ "confidence": "high",
3620
+ "candidates": [
3621
+ "aliexpress"
3622
+ ]
3623
+ },
3624
+ {
3625
+ "input": "DOFR0000000000001HU",
3626
+ "carrier": "unknown",
3627
+ "confidence": "none",
3628
+ "candidates": []
3629
+ },
3630
+ {
3631
+ "input": "DOFR000000000001HD",
3632
+ "carrier": "unknown",
3633
+ "confidence": "none",
3634
+ "candidates": []
3635
+ },
3616
3636
  {
3617
3637
  "input": "DQ0DK20000034530118220Z",
3618
3638
  "carrier": "correos-spain",
@@ -4462,6 +4482,28 @@
4462
4482
  "ninja-van"
4463
4483
  ]
4464
4484
  },
4485
+ {
4486
+ "input": "OMGO0000000000001",
4487
+ "carrier": "omgo",
4488
+ "confidence": "high",
4489
+ "candidates": [
4490
+ "omgo"
4491
+ ]
4492
+ },
4493
+ {
4494
+ "input": "OMGO000000000001",
4495
+ "carrier": "unknown",
4496
+ "confidence": "none",
4497
+ "candidates": []
4498
+ },
4499
+ {
4500
+ "input": "OMGO0000000050001",
4501
+ "carrier": "omgo",
4502
+ "confidence": "high",
4503
+ "candidates": [
4504
+ "omgo"
4505
+ ]
4506
+ },
4465
4507
  {
4466
4508
  "input": "PHAS9C0419962810128017D",
4467
4509
  "carrier": "correos-spain",
@@ -278,7 +278,10 @@ var ue = {
278
278
  domains: ["global.cainiao.com"],
279
279
  params: ["mailNoList"]
280
280
  }],
281
- detectionRules: []
281
+ detectionRules: [{
282
+ pattern: "^DOFR\\d{13}HD$",
283
+ confidence: "high"
284
+ }]
282
285
  },
283
286
  sunyou: {
284
287
  displayName: "SunYou",
@@ -3059,8 +3062,27 @@ var ue = {
3059
3062
  params: ["itemId"]
3060
3063
  }],
3061
3064
  detectionRules: []
3065
+ },
3066
+ omgo: {
3067
+ displayName: "OMGO",
3068
+ color: "#8e8e93",
3069
+ aliases: ["OMGO Express"],
3070
+ countries: ["CN"],
3071
+ selectable: !0,
3072
+ timezone: "UTC",
3073
+ tracking: {
3074
+ mode: "automatic",
3075
+ adapter: "universal"
3076
+ },
3077
+ canaryUrl: "https://omgoexpress.cn/",
3078
+ trackingUrlTemplate: "https://omgoexpress.cn/",
3079
+ linkRules: [],
3080
+ detectionRules: [{
3081
+ pattern: "^OMGO\\d{13}$",
3082
+ confidence: "high"
3083
+ }]
3062
3084
  }
3063
- }, de = /* @__PURE__ */ "swiss-post.swiss-post-cargo.quickpac.planzer.aliexpress.sunyou.hermes.spring-gds.postlogistics.dachser.dhl.dhl-ecommerce.ups.amazon-logistics.amazon-shipping.fedex.gls-ch.dpd.dpd-fr.mondial-relay.relais-colis.la-poste.chronopost.gls-fr.colis-prive.geodis.colisweb.c-chez-vous.heppner.ciblex.paack.asendia.shipup.india-post.hermes-de.gls-de.delivengo.intl-post.unknown.royal-mail.parcelforce.evri.inpost.an-post.bpost.austrian-post.postnord.posti.correos-express.seur.mrw.nacex.ctt.ctt-express.poste-italiane.brt.ecoscooting.tipsa.ukrposhta.usps.canada-post.purolator.canpar.ontrac.speedx.uniuni.landmark-global.old-dominion.spee-dee.gofo.estafeta.correios-br.correos-chile.yunexpress.four-px.blue-dart.delhivery.nz-post.singapore-post.japan-post.sf-express.sto.yunda.yto.zto.jd-logistics.yamato.korea-post.thailand-post.dtdc.australia-post.hongkong-post.pos-malaysia.ninja-van.china-post.packeta.poczta-polska.bring-posten.aramex.tnt.correos-spain.yanwen.the-courier-guy.j-and-t.ems".split("."), fe = [
3085
+ }, de = /* @__PURE__ */ "swiss-post.swiss-post-cargo.quickpac.planzer.aliexpress.sunyou.hermes.spring-gds.postlogistics.dachser.dhl.dhl-ecommerce.ups.amazon-logistics.amazon-shipping.fedex.gls-ch.dpd.dpd-fr.mondial-relay.relais-colis.la-poste.chronopost.gls-fr.colis-prive.geodis.colisweb.c-chez-vous.heppner.ciblex.paack.asendia.shipup.india-post.hermes-de.gls-de.delivengo.intl-post.unknown.royal-mail.parcelforce.evri.inpost.an-post.bpost.austrian-post.postnord.posti.correos-express.seur.mrw.nacex.ctt.ctt-express.poste-italiane.brt.ecoscooting.tipsa.ukrposhta.usps.canada-post.purolator.canpar.ontrac.speedx.uniuni.landmark-global.old-dominion.spee-dee.gofo.estafeta.correios-br.correos-chile.yunexpress.four-px.blue-dart.delhivery.nz-post.singapore-post.japan-post.sf-express.sto.yunda.yto.zto.jd-logistics.yamato.korea-post.thailand-post.dtdc.australia-post.hongkong-post.pos-malaysia.ninja-van.china-post.packeta.poczta-polska.bring-posten.aramex.tnt.correos-spain.yanwen.the-courier-guy.j-and-t.ems.omgo".split("."), fe = [
3064
3086
  "pending",
3065
3087
  "registered",
3066
3088
  "accepted",
@@ -3313,7 +3335,8 @@ var We = [
3313
3335
  /\b1G[A-Z0-9]{10}\b/gi,
3314
3336
  /\b[A-Z]{2}\s*\d(?:[\s.-]?\d){8}\s*[A-Z]{2}\b/gi,
3315
3337
  /\b(?:JJD|JVGL)[A-Z0-9]{8,}\b/gi,
3316
- /\b\d(?:[\s.-]?\d){9,19}\b/g
3338
+ /\b\d(?:[\s.-]?\d){9,19}\b/g,
3339
+ /\b[A-Z0-9]{4,40}\b/gi
3317
3340
  ];
3318
3341
  function Ge(e) {
3319
3342
  for (let t of We) {
@@ -55,5 +55,11 @@
55
55
  ]
56
56
  }
57
57
  ],
58
- "detection": []
58
+ "detection": [
59
+ {
60
+ "id": "aliexpress-1",
61
+ "pattern": "^DOFR\\d{13}HD$",
62
+ "confidence": "high"
63
+ }
64
+ ]
59
65
  }
@@ -1,6 +1,28 @@
1
1
  {
2
2
  "carrier": "aliexpress",
3
3
  "records": [
4
+ {
5
+ "number": "DOFR0000000000001HD",
6
+ "role": "shipment",
7
+ "evidence": "synthetic",
8
+ "derivedFrom": "observed_request",
9
+ "expect": { "carrier": "aliexpress", "confidence": "high" },
10
+ "note": "Synthetic Cainiao shipment-number shape."
11
+ },
12
+ {
13
+ "number": "DOFR000000000001HD",
14
+ "role": "negative",
15
+ "evidence": "synthetic",
16
+ "derivedFrom": "invented",
17
+ "expect": { "carrier": "unknown", "confidence": "none", "not": ["aliexpress"] }
18
+ },
19
+ {
20
+ "number": "DOFR0000000000001HU",
21
+ "role": "negative",
22
+ "evidence": "synthetic",
23
+ "derivedFrom": "invented",
24
+ "expect": { "carrier": "unknown", "confidence": "none", "not": ["aliexpress"] }
25
+ },
4
26
  {
5
27
  "number": "CNG00798678939847",
6
28
  "role": "shipment",
@@ -0,0 +1,35 @@
1
+ {
2
+ "id": "omgo",
3
+ "displayName": "OMGO",
4
+ "aliases": ["OMGO Express"],
5
+ "region": {
6
+ "countries": ["CN"]
7
+ },
8
+ "brand": {
9
+ "color": "#8e8e93"
10
+ },
11
+ "selectable": true,
12
+ "timezone": "UTC",
13
+ "tracking": {
14
+ "mode": "automatic",
15
+ "adapter": "universal",
16
+ "steps": []
17
+ },
18
+ "capabilities": [],
19
+ "portal": {
20
+ "url": "https://omgoexpress.cn/",
21
+ "canaryUrl": "https://omgoexpress.cn/",
22
+ "shows": [],
23
+ "scraped": [],
24
+ "discarded": [],
25
+ "unavailable": []
26
+ },
27
+ "links": [],
28
+ "detection": [
29
+ {
30
+ "id": "omgo-1",
31
+ "pattern": "^OMGO\\d{13}$",
32
+ "confidence": "high"
33
+ }
34
+ ]
35
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "carrier": "omgo",
3
+ "records": [
4
+ {
5
+ "number": "OMGO0000000000001",
6
+ "role": "shipment",
7
+ "evidence": "synthetic",
8
+ "derivedFrom": "observed_request",
9
+ "expect": { "carrier": "omgo", "confidence": "high" },
10
+ "note": "Synthetic shipment-number shape."
11
+ },
12
+ {
13
+ "number": "OMGO0000000050001",
14
+ "role": "shipment",
15
+ "evidence": "synthetic",
16
+ "derivedFrom": "invented",
17
+ "expect": { "carrier": "omgo", "confidence": "high" },
18
+ "note": "Synthetic suffix also accepted by the generic Colis Privé composite rule."
19
+ },
20
+ {
21
+ "number": "OMGO000000000001",
22
+ "role": "negative",
23
+ "evidence": "synthetic",
24
+ "derivedFrom": "invented",
25
+ "expect": { "carrier": "unknown", "confidence": "none", "not": ["omgo"] }
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "carrier": "omgo",
3
+ "entries": []
4
+ }
@@ -20,6 +20,8 @@ export const TRACKING_CANDIDATE_PATTERNS = [
20
20
  /\b[A-Z]{2}\s*\d(?:[\s.-]?\d){8}\s*[A-Z]{2}\b/gi,
21
21
  /\b(?:JJD|JVGL)[A-Z0-9]{8,}\b/gi,
22
22
  /\b\d(?:[\s.-]?\d){9,19}\b/g,
23
+ // Let catalog rules claim other complete identifiers without copying their shapes here.
24
+ /\b[A-Z0-9]{4,40}\b/gi,
23
25
  ];
24
26
  /** The first candidate in the text that one carrier claims confidently. */
25
27
  export function recognizedNumberInText(raw) {
@@ -193,7 +193,12 @@
193
193
  ]
194
194
  }
195
195
  ],
196
- "detectionRules": []
196
+ "detectionRules": [
197
+ {
198
+ "pattern": "^DOFR\\d{13}HD$",
199
+ "confidence": "high"
200
+ }
201
+ ]
197
202
  },
198
203
  "sunyou": {
199
204
  "displayName": "SunYou",
@@ -3969,5 +3974,30 @@
3969
3974
  }
3970
3975
  ],
3971
3976
  "detectionRules": []
3977
+ },
3978
+ "omgo": {
3979
+ "displayName": "OMGO",
3980
+ "color": "#8e8e93",
3981
+ "aliases": [
3982
+ "OMGO Express"
3983
+ ],
3984
+ "countries": [
3985
+ "CN"
3986
+ ],
3987
+ "selectable": true,
3988
+ "timezone": "UTC",
3989
+ "tracking": {
3990
+ "mode": "automatic",
3991
+ "adapter": "universal"
3992
+ },
3993
+ "canaryUrl": "https://omgoexpress.cn/",
3994
+ "trackingUrlTemplate": "https://omgoexpress.cn/",
3995
+ "linkRules": [],
3996
+ "detectionRules": [
3997
+ {
3998
+ "pattern": "^OMGO\\d{13}$",
3999
+ "confidence": "high"
4000
+ }
4001
+ ]
3972
4002
  }
3973
4003
  }
@@ -126,7 +126,10 @@ export declare const CARRIER_CATALOG: {
126
126
  readonly domains: readonly ["global.cainiao.com"];
127
127
  readonly params: readonly ["mailNoList"];
128
128
  }];
129
- readonly detectionRules: readonly [];
129
+ readonly detectionRules: readonly [{
130
+ readonly pattern: "^DOFR\\d{13}HD$";
131
+ readonly confidence: "high";
132
+ }];
130
133
  };
131
134
  readonly sunyou: {
132
135
  readonly displayName: "SunYou";
@@ -2667,8 +2670,27 @@ export declare const CARRIER_CATALOG: {
2667
2670
  }];
2668
2671
  readonly detectionRules: readonly [];
2669
2672
  };
2673
+ readonly omgo: {
2674
+ readonly displayName: "OMGO";
2675
+ readonly color: "#8e8e93";
2676
+ readonly aliases: readonly ["OMGO Express"];
2677
+ readonly countries: readonly ["CN"];
2678
+ readonly selectable: true;
2679
+ readonly timezone: "UTC";
2680
+ readonly tracking: {
2681
+ readonly mode: "automatic";
2682
+ readonly adapter: "universal";
2683
+ };
2684
+ readonly canaryUrl: "https://omgoexpress.cn/";
2685
+ readonly trackingUrlTemplate: "https://omgoexpress.cn/";
2686
+ readonly linkRules: readonly [];
2687
+ readonly detectionRules: readonly [{
2688
+ readonly pattern: "^OMGO\\d{13}$";
2689
+ readonly confidence: "high";
2690
+ }];
2691
+ };
2670
2692
  };
2671
- export declare const CARRIER_IDS: readonly ["swiss-post", "swiss-post-cargo", "quickpac", "planzer", "aliexpress", "sunyou", "hermes", "spring-gds", "postlogistics", "dachser", "dhl", "dhl-ecommerce", "ups", "amazon-logistics", "amazon-shipping", "fedex", "gls-ch", "dpd", "dpd-fr", "mondial-relay", "relais-colis", "la-poste", "chronopost", "gls-fr", "colis-prive", "geodis", "colisweb", "c-chez-vous", "heppner", "ciblex", "paack", "asendia", "shipup", "india-post", "hermes-de", "gls-de", "delivengo", "intl-post", "unknown", "royal-mail", "parcelforce", "evri", "inpost", "an-post", "bpost", "austrian-post", "postnord", "posti", "correos-express", "seur", "mrw", "nacex", "ctt", "ctt-express", "poste-italiane", "brt", "ecoscooting", "tipsa", "ukrposhta", "usps", "canada-post", "purolator", "canpar", "ontrac", "speedx", "uniuni", "landmark-global", "old-dominion", "spee-dee", "gofo", "estafeta", "correios-br", "correos-chile", "yunexpress", "four-px", "blue-dart", "delhivery", "nz-post", "singapore-post", "japan-post", "sf-express", "sto", "yunda", "yto", "zto", "jd-logistics", "yamato", "korea-post", "thailand-post", "dtdc", "australia-post", "hongkong-post", "pos-malaysia", "ninja-van", "china-post", "packeta", "poczta-polska", "bring-posten", "aramex", "tnt", "correos-spain", "yanwen", "the-courier-guy", "j-and-t", "ems"];
2693
+ export declare const CARRIER_IDS: readonly ["swiss-post", "swiss-post-cargo", "quickpac", "planzer", "aliexpress", "sunyou", "hermes", "spring-gds", "postlogistics", "dachser", "dhl", "dhl-ecommerce", "ups", "amazon-logistics", "amazon-shipping", "fedex", "gls-ch", "dpd", "dpd-fr", "mondial-relay", "relais-colis", "la-poste", "chronopost", "gls-fr", "colis-prive", "geodis", "colisweb", "c-chez-vous", "heppner", "ciblex", "paack", "asendia", "shipup", "india-post", "hermes-de", "gls-de", "delivengo", "intl-post", "unknown", "royal-mail", "parcelforce", "evri", "inpost", "an-post", "bpost", "austrian-post", "postnord", "posti", "correos-express", "seur", "mrw", "nacex", "ctt", "ctt-express", "poste-italiane", "brt", "ecoscooting", "tipsa", "ukrposhta", "usps", "canada-post", "purolator", "canpar", "ontrac", "speedx", "uniuni", "landmark-global", "old-dominion", "spee-dee", "gofo", "estafeta", "correios-br", "correos-chile", "yunexpress", "four-px", "blue-dart", "delhivery", "nz-post", "singapore-post", "japan-post", "sf-express", "sto", "yunda", "yto", "zto", "jd-logistics", "yamato", "korea-post", "thailand-post", "dtdc", "australia-post", "hongkong-post", "pos-malaysia", "ninja-van", "china-post", "packeta", "poczta-polska", "bring-posten", "aramex", "tnt", "correos-spain", "yanwen", "the-courier-guy", "j-and-t", "ems", "omgo"];
2672
2694
  export type CarrierId = (typeof CARRIER_IDS)[number];
2673
2695
  export declare const STAGES: readonly ["pending", "registered", "accepted", "in_transit", "out_for_delivery", "delivered", "customs", "failed_attempt", "ready_for_pickup", "returned", "exception"];
2674
2696
  export type Stage = (typeof STAGES)[number];
@@ -194,7 +194,12 @@ export const CARRIER_CATALOG = {
194
194
  ]
195
195
  }
196
196
  ],
197
- "detectionRules": []
197
+ "detectionRules": [
198
+ {
199
+ "pattern": "^DOFR\\d{13}HD$",
200
+ "confidence": "high"
201
+ }
202
+ ]
198
203
  },
199
204
  "sunyou": {
200
205
  "displayName": "SunYou",
@@ -3970,6 +3975,31 @@ export const CARRIER_CATALOG = {
3970
3975
  }
3971
3976
  ],
3972
3977
  "detectionRules": []
3978
+ },
3979
+ "omgo": {
3980
+ "displayName": "OMGO",
3981
+ "color": "#8e8e93",
3982
+ "aliases": [
3983
+ "OMGO Express"
3984
+ ],
3985
+ "countries": [
3986
+ "CN"
3987
+ ],
3988
+ "selectable": true,
3989
+ "timezone": "UTC",
3990
+ "tracking": {
3991
+ "mode": "automatic",
3992
+ "adapter": "universal"
3993
+ },
3994
+ "canaryUrl": "https://omgoexpress.cn/",
3995
+ "trackingUrlTemplate": "https://omgoexpress.cn/",
3996
+ "linkRules": [],
3997
+ "detectionRules": [
3998
+ {
3999
+ "pattern": "^OMGO\\d{13}$",
4000
+ "confidence": "high"
4001
+ }
4002
+ ]
3973
4003
  }
3974
4004
  };
3975
4005
  export const CARRIER_IDS = [
@@ -4077,7 +4107,8 @@ export const CARRIER_IDS = [
4077
4107
  "yanwen",
4078
4108
  "the-courier-guy",
4079
4109
  "j-and-t",
4080
- "ems"
4110
+ "ems",
4111
+ "omgo"
4081
4112
  ];
4082
4113
  export const STAGES = [
4083
4114
  "pending",
@@ -239,6 +239,7 @@ export const REGISTRY = {
239
239
  "ninja-van": "ninja-van",
240
240
  "nz-post": "nz-post",
241
241
  "old-dominion": "universal",
242
+ "omgo": "universal",
242
243
  "ontrac": "ontrac",
243
244
  "paack": "paack",
244
245
  "packeta": "packeta",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-parcel-scraper",
3
- "version": "0.4.0-main.319",
3
+ "version": "0.4.0-main.320",
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",