git: 9front

Download patch

ref: d91970b46ee24fe137af7f9acca1514098b0e4ef
parent: a21e7df08d23d4e41cde4a48f6238ba8fff93896
author: stanley lieber <stanley.lieber@gmail.com>
date: Thu Mar 15 23:24:14 EDT 2012

usps: fix broken api call, filter out html junk

--- a/rc/bin/usps
+++ b/rc/bin/usps
@@ -9,12 +9,13 @@
 
 rfork e
 
-hget -p 'origTrackNum='^$1 http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do |
-	htmlfmt > /tmp/usps.$pid
+hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
+	uhtml | htmlfmt > /tmp/usps.$pid
 
 sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
-0,/Label/-1d
-/^Enter Label/,$d
+,/Your Label Number/-1d
+/Check on Another Item/,$d
+/id=\"error-tLabels\"/,$d
 ,p
 !
 rm /tmp/usps.$pid
--