Skip to content

Instantly share code, notes, and snippets.

@rkfg
Last active May 16, 2018 10:31
Show Gist options
  • Save rkfg/3d5b06e528176053c284580bc74e6313 to your computer and use it in GitHub Desktop.
Save rkfg/3d5b06e528176053c284580bc74e6313 to your computer and use it in GitHub Desktop.
Torrefacto Pickpoint delivery tracking
#!/bin/sh
PAGE=$( wget -qO- --post-data="shop=5742011_923%2C1979335517_923%2C1262625646_923&order_number=$1" https://pickpoint.ru/monitoring/msearch.php )
echo "$PAGE" | sed -n 's#.*\(Текущий статус :[^<]*\).*#\1#p'
PARAMS=$(echo "$PAGE" | sed -n 's#.*onclick="monitoring.show_history(&quot;\([0-9]*\)&quot;, &quot;\([0-9]*\)&quot.*#id=\1\&owner_id=\2#p')
wget -qO- "https://pickpoint.ru/monitoring/mhistory.php?$PARAMS" | sed -n 's#.*<tr><td>\([^<]*\)</td><td>\([^<][^<]*\)</td></tr>.*#\1 — \2\n#gp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment