usps: fix broken api call, filter out html junk
This commit is contained in:
parent
bc3457726a
commit
7e0017ebd6
1 changed files with 5 additions and 4 deletions
|
@ -9,12 +9,13 @@ if(! ~ $#* 1) {
|
||||||
|
|
||||||
rfork e
|
rfork e
|
||||||
|
|
||||||
hget -p 'origTrackNum='^$1 http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do |
|
hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
|
||||||
htmlfmt > /tmp/usps.$pid
|
uhtml | htmlfmt > /tmp/usps.$pid
|
||||||
|
|
||||||
sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
|
sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
|
||||||
0,/Label/-1d
|
,/Your Label Number/-1d
|
||||||
/^Enter Label/,$d
|
/Check on Another Item/,$d
|
||||||
|
/id=\"error-tLabels\"/,$d
|
||||||
,p
|
,p
|
||||||
!
|
!
|
||||||
rm /tmp/usps.$pid
|
rm /tmp/usps.$pid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue