diff options
author | stanley lieber <stanley.lieber@gmail.com> | 2012-03-16 03:24:14 -0500 |
---|---|---|
committer | stanley lieber <stanley.lieber@gmail.com> | 2012-03-16 03:24:14 -0500 |
commit | 7e0017ebd6d292b86d274a6378653b1d45ca435f (patch) | |
tree | f2435660eb397f2e3fd2e8d154704319bcbf948d /rc/bin | |
parent | bc3457726a551cc92b17ad4006620cd8b8dc102e (diff) |
usps: fix broken api call, filter out html junk
Diffstat (limited to 'rc/bin')
-rwxr-xr-x | rc/bin/usps | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rc/bin/usps b/rc/bin/usps index 7c7cf1921..dfdd78ccf 100755 --- a/rc/bin/usps +++ b/rc/bin/usps @@ -9,12 +9,13 @@ if(! ~ $#* 1) { 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 |