home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Python Deal searching script

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2712
Discussions: 200,970, Posts: 2,379,714, Members: 246,335
Old July 4th, 2006, 11:29 PM   Digg it!   #1 (permalink)
Perfetc Member
 
VHockey86's Avatar
 
Join Date: Jan 2003
Location: Maryland Suburbia
Posts: 4,334
Python Deal searching script

I know this forum isn't really heavily into programming -- but I wrote this script for my own use and thought others here might find it useful.

http://www.andrewpangborn.com/files/deal_searcher.py

It's a script written in python that searches deal websites (such as our own resellerratings.com) for products and emails them to you.

You have to define some email settings (such as an SMTP server, and a target email address).

The next step is to customize the list of products you want to search for. This is just an array of strings. The constants at the top of the script are commented pretty well, so you should be able to figure it out. If anything is confusing, just post and I'll try to clarify.

It keeps a history of deals, so you wont get the same ones emailed to you continually.

Its intended to be run as a scheduled task in windows, or as a cron job in linux. I have mine run on an hourly basis.
Most linux distros should have python installed by default. Windows users will need to install the python runtime.
http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi
No compilation is needed, just double click on the script and it'll run in a command-line window with the python interpreter/runtime.

Here's an example of what the output looks like (that gets emailed to you)
Code:
--------------------------------------------------------------------
Deal found on site: http://bensbargains.net

Deal #1: Product: 20.1"
BenQ FP202W Black 20.1" Digital LCD $295 at

--------------------------------------------------------------------
I guess thats all,
VHockey86

Last edited by VHockey86 : July 4th, 2006 at 11:34 PM.
VHockey86 is offline   Reply With Quote
Old July 4th, 2006, 11:43 PM     #2 (permalink)
Anime Otaku
 
RobRich's Avatar
 
Join Date: Oct 2001
Location: Tampa, FL USA
Posts: 108,980
Blog Entries: 15
The script looks interesting. Thanks for sharing.

I only did a quick skim of the code, and it appears you are searching HTML for keyword strings. If you want to speed up the process, you might want to look into searching RSS feeds in a future version. Your thoughts?
RobRich is offline   Reply With Quote
Old July 4th, 2006, 11:50 PM     #3 (permalink)
Perfetc Member
 
VHockey86's Avatar
 
Join Date: Jan 2003
Location: Maryland Suburbia
Posts: 4,334
Yes, that would be a much better approach, assuming the sites all provide RSS feeds.

Normally I use the BeautifulSoup library for python to help with webscraping, but I didn't want to have to hard-code the scraping for each individual webpage.

I know that things like keywords found in links can sort of throw off the script as it is now. Basically it works well enough for me that I haven't put alot of effort into error checking and fanciness.

I appreciate the feedback and ideas.
VHockey86 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python? Amr Webmastering and Programming 0 February 18th, 2006 09:55 AM
using a python script to install a printer engineuity Webmastering and Programming 5 October 5th, 2005 10:33 AM
Python joker_927 IMO Community 10 August 26th, 2004 02:26 AM
Searching for a hard drive deal 20GB-80GB MrPsychoGreaser ResellerRatings Homepage Deals 4 February 15th, 2003 09:22 AM
Need help with Python.... couch potato Webmastering and Programming 1 February 8th, 2003 07:43 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3039)
Forty-six years ago today (12)
The disrespect of Obama by Russian .. (47)
Nvidia GTX 260 problem (5)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
windows vista security holes (17)
Internet Lost (5)
windows 7 problem (7)
Is the PSU I received dead? (13)
Point and Shoot Camera Suggestions. (6)
radeon x850xt platinum & shader.. (6)
Recent Discussions
Delete an OS (10)
Nvidia GTX 260 problem (5)
Steam ID's, Gamertags etc... (3)
Games, Cables, PCI cards, and more fo.. (6)
Dept. of HS: NSA 'Helped' Develop Vis.. (17)
Linksys WMP54GS wireless card problem.. (5)
windows vista security holes (17)
Help getting around port 80 for camer.. (5)
Skillsoft Network+ Study Software Que.. (10)
Browsers wont load websites (3)
help me pls laptop just stopped worki.. (0)
Open With ..... Win7 (3)
Laptop with wireless problem. (12)
Internet Lost (5)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)
tv not turn on-makes clicking sound (2)


All times are GMT -4. The time now is 06:03 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28