Created
May 20, 2020 14:23
-
-
Save nemanjan00/07bc9de4fa2c34699b4f5a6509a93113 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paket () { | |
curl "https://www.posta.rs/cir/alati/pracenje-posiljke.aspx?broj=$1" -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-User: ?1' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'Sec-Fetch-Site: same-origin' -H 'Accept-Language: en-US,en;q=0.9' -H 'DNT: 1' -H 'Accept-Encoding: gzip, deflate, br' --compressed 2>/dev/null | grep " <td>" | tr -d '\t' | tr -s " " | head -n1 | sed 's$</td><td>$ $g' | sed 's$<td>$$g' | sed 's$ </td>$$g' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment