← back to Dw Kravet Hires
scripts/__pycache__/build-batchC-map.cpython-314.pyc
146 lines
+
�)�j�; � �\ � R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI
Ht ^ RIH
t
Ht ^ RIHtHt ^ RIHt ]P( P+ ]P( P- ]4 4 t]P( P+ ]4 t]P( P5 ]R4 t]P( P5 ]R4 t]P( P5 ]R4 t]P( P5 ]R 4 t]P( P5 ]R
4 t]P( P5 ]R4 t ]!! ]PD PG RR
4 4 t$]!! ]PD PG RR4 4 t%Rt&Rt'Rt(R t)R t*R t+R t,R t-R t.R t/R t0R t1R t2]3R8X d
]2! 4 R# R# )uA TK-12097 Batch C — Hollywood Wallcoverings hi-res featured-image swap map.
Hollywood Wallcoverings is a PRIVATE LABEL of Momentum/Versa. Hi-res source =
the momentum_colorways staging table's Cloudinary image_url, which is served with
a downscale transform (.../image/upload/c_scale,w_640/v1/hi_res/<file>). We build
the hi-res candidate by REWRITING c_scale,w_640 -> c_scale,w_2000 (bigger). No leak
risk: apply-hires uses the hi-res URL only as `originalSource`, so Shopify downloads
and RE-HOSTS the image on its own CDN — the momentum cloudinary domain never appears
on the storefront.
JOIN: shopify_products.dw_sku <-> momentum_colorways.dw_sku is EMPTY (Shopify carries
the real X-codes; momentum staging carries fabricated DWHD-* codes). So the join used
is the manufacturer-code join: shopify mfr_sku tail (code after last '_') = momentum
alt_sku OR pattern_sku, requiring a UNIQUE resulting image (the vendor code encodes
pattern+colorway, so a unique code match is colorway-level authoritative). Ambiguous
(>1 distinct image) rows are held to tier2-colorway-unverified.
Input : data/tk12097/batchC-candidates.tsv
shopify_id mfr_sku dw_sku cur_url momentum_raw_url join_type
Output: data/tk12097/batchC-final-map.json (apply-hires.mjs row schema + counts)
data/tk12097/batchC-measured.json (full per-row measurement evidence)
data/tk12097/batchC-tier2-colorway-unverified.json
data/tk12097/batchC-no-hires-source.json
All $0, network reads only; every dimension MEASURED (ranged-GET + PIL), never claimed.
N)�Counter)�Request�urlopen)� HTTPError�URLError)�Imagezdata/tk12097zbatchC-candidates.tsvzbatchC-final-map.jsonzbatchC-measured.jsonz%batchC-tier2-colorway-unverified.jsonzbatchC-no-hires-source.json�
MAX_LOWRES�500�HIRES_FLOOR�800i� z*Mozilla/5.0 (dw-preflight TK-12097 batchC)c �2 � V P R 4 ^ , # )�?)�split)�urls &�F/Users/macstudio3/Projects/dw-kravet-hires/scripts/build-batchC-map.py�strip_qsr 2 s � ��9�9�S�>�!��� c �� � \ V 4 pRV9 d VP RR4 # \ P ! RV4 pV'