#!/bin/bash
# The following script parses aliexpress product's price with bash.
# Required: wget; cat; grep; awk (everything except wget should be installed by default)
# The following scripts takes URL of a product.
# Run like: ./script.sh "https://ru.aliexpress.com/item/SAMSUNG-USB-Flash-Drive-Disk16G-32G-64G-128-USB-3-0-Metal-Super-Mini-Pen-Drive/32595548093.html"
echo "The price of the item is:"
wget -O a.html -q "$1"; cat a.html | grep j-sku-price | awk -F">" '{ print $2 }' | awk -F"<" '{ print $1 }'
rm a.html
Comments