Pages:
Author

Topic: Auto-notify Script for Newegg 5830s (or any other site) - page 2. (Read 6307 times)

hero member
Activity: 896
Merit: 1000
Seal Cub Clubbing Club
Way too much work. Just use nowinstock.net. It's free and amazingly quick. I've picked up all my cards using the notification emails from them for 6990's on NewEgg.

http://www.nowinstock.net/computers/videocards/amd/6990/
Is there a way to get NowInStock.net to monitor for 5830s?
donator
Activity: 2352
Merit: 1060
between a rock and a block!
member
Activity: 83
Merit: 10
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
I got two in my shopping cart.
But I have no idea if they get dumped out by other orders getting paid first.

Edit: I waited too long as I had to transfer money. They got snatched away. Blah.
They stayed in my cart for about a half hour.
sr. member
Activity: 378
Merit: 255
Wow already out again.
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
Just got my SMS - Newegg has 5830s again in stock.
sr. member
Activity: 378
Merit: 255
Thanks for that! It seems like they don't track 5830s, you can add as a custom it seems.

I imagine this script will be a bit quicker to the draw. You can modify the polling rate to your liking.
full member
Activity: 124
Merit: 251
Way too much work. Just use nowinstock.net. It's free and amazingly quick. I've picked up all my cards using the notification emails from them for 6990's on NewEgg.

http://www.nowinstock.net/computers/videocards/amd/6990/
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
Gmail can send sms as well. You send to [email protected].

Here is a list of the carrier addresses http://en.wikipedia.org/wiki/List_of_SMS_gateways.
I'm in Thailand and after looking around this was the only one I could find that works with my carrier.
I haven't even bought credits so it just sends a promo text when I use it - but that lets me know anyway.
sr. member
Activity: 378
Merit: 255
Gmail can send sms as well. You send to [email protected].

Here is a list of the carrier addresses http://en.wikipedia.org/wiki/List_of_SMS_gateways.
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
Yes, nice one!

I needed one like this to also send an SMS. You inspired me to take yours and modify it.
I simplified a bit and added details for SMS using the Clickatell api.

I comment out the echo dots and msg because I run it in background using "&" so I don't keep open a console.

Code:
#!/bin/bash

url="http://content.newegg.com/LandingPage/ItemInfo4ProductDetail.aspx?Item=N82E16814102878"
txt="OUT OF STOCK"

mailsrv="smtps://smtp.gmail.com:465"
mailuser="[email protected]"
mailpwd="whatever"
mailmsg="Subject: NewEgg Video Cards in Stock\r\n\r\nCome and get 'em."
from="[email protected]"
to="[email protected]"

smsuser="userid"
smspwd=""
smsapi="apicode"
smsphone="phonenumber"
smsmsg="NewEgg Video Cards in Stock"

#echo "Checking newegg for video cards"
while [ -z "`wget -qO- "$url" | grep "$txt"`" ]; do
#  echo -n "."
  sleep 1m
done

if [ -n "$smspwd" ]; then
  wget "http://api.clickatell.com/http/sendmsg?user=$smsuser&password=$smspwd&api_id=$smsapi&to=$smsphone&text=$smsmsg"
fi

if [ -n "$mailpwd" ]; then
  printf "$mailmsg" | curl -n --ssl-reqd --mail-from "<$from>" --mail-rcpt "<$to>" --url "$mailsrv" -T - -u "$mailuser:$mailpwd"
fi
hero member
Activity: 556
Merit: 500
Nice!! I could use this for some other things as well.
sr. member
Activity: 378
Merit: 255
Well it worked, a batch came and went.

Good luck.
sr. member
Activity: 378
Merit: 255
Newegg's auto-notify is worthless. I wrote this script that you can run on your linux miner box that will check the stock of the Sapphire 5830s and email you with a link to the newegg page if it comes in stock.

It checks every minute. It is currently set up to use a gmail address but you can change this to work with your server.

You firstly need curl, this is an application that will handle the connection to gmail. For debian/ubuntu:

Code:
sudo apt-get install curl

Now open your favorite text editor (vi, gedit, etc.) and paste the following code:

Code:
from_address="[email protected]" # change this
to_address="[email protected]" # and this
username="[email protected]" # and this
password="yourpass" #            this too
echo -n "Checking newegg for video cards"
echo "Subject: Video card update

Go buy some video cards, hurry! http://www.newegg.com/Product/Product.aspx?Item=N82E16814102878&cm_re=5830-_-14-102-878-_-Product
" > message.txt
running=true; while $running; do
echo -n "."
sleep 1m
if [ -z "`wget -qO- http://content.newegg.com/LandingPage/ItemInfo4ProductDetail.aspx?Item=N82E16814102878 | grep "OUT OF STOCK"`" ]
then
echo "In stock! Sending an email."
curl -n --ssl-reqd --mail-from "<$from_address>" --mail-rcpt "<$to_address>" --url smtps://smtp.gmail.com:465 -T message.txt -u "$username:$password"
running=false
rm message.txt
fi
done

You will need to edit the relevant top lines to reflect your email address and password. Now save it as "check.sh".

Then, from a command prompt "cd" to the folder where it is saved and enter:

Code:
sh check.sh

OK it's checking, you should see:

Code:
Checking newegg for video cards...

Where a "." is printed every time it checks. Leave this terminal running as long as you would like to check. It will quit if the product no longer says "OUT OF STOCK". Feel free to modify this code to check for another card. If you can't figure it out I can help out with those modifications.

I am hoping those who choose to use this aren't just turning around to sell on ebay, and good luck!
Pages:
Jump to: