Hi,
I am trying to hack up a quick script which logs into my amazon.co.uk seller account, checks the page to see if all my items are marked as low price and then sends me an email if they're not. I'm using bash at the moment.
I tried using lynx, but it comes unstuck on logging in, with amazon.co.uk claiming cookies aren't enabled. Other text-only browsers seem to not support key-stroke logs so I cannot run a session automatically like that.
The other solution would be to use perl or php. Can anybody give me any starters?
thanks
Here is my script so far by the way...
Code:
#might need absolute paths#
#do login with lynx#
#parse file#
email=0
NOITEMS=`cat list-inventory.html | grep "<strong>" | sed '$!d' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'`
NOLOW=`cat list-inventory.html | grep "alt=\"Low Price"\" | sed -n '$='`
#check all items are low price#
if [ $NOITEMS = $NOLOW ]; then
echo "All items at low price"
else
echo "Some items not low price!"
let email=1
fi
#send email#
if [ $email = 1 ]; then
echo "SENDING EMAIL....";
fi
#Quick debug#
echo $email
echo $NOLOW
echo $NOITEMS