Dell warranty checking script

Joshua Daniel Franklin jdf.lists at gmail.com
Thu May 28 19:04:27 CDT 2009


On Tue, May 26, 2009 at 4:09 PM, Joshua Daniel Franklin wrote:
> Somewhat unrelated--but if anyone at Dell is listening, I'd also still
> like a web
> service to query warranty status like this Apple JSON one:
> <https://selfsolve.apple.com/Warranty.do?serialNumber=W844502QPNZ&country=USA&fullCountryName=United%20States>


Well, with Erinn's code it's pretty easy to put up a simple CGI so I did.
Anyone is welcome to hit it, but no promises:

http://fma.biostr.washington.edu/cgi-bin/dell_warranty.cgi?serial=3BLJ251

Right now it just outputs four lines of plan text:

SERIAL_ID:3BLJ251
PURCHASE_DATE:6/14/2004
COVERAGE_DATE:6/14/2007
DAYS_LEFT:0

The var names are based on Apple's because I already had code looking
for those vars.


Here's the whole thing minus get_warranty from Erinn:

if __name__ == '__main__':
	import urllib2
	print "Content-Type: text/plain\n"
	
	form = cgi.FieldStorage()
	if (form.has_key("serial") ):
		s = form["serial"].value
#		s = '2FV2TG1'
		result = get_warranty(s)
		start_date, end_date, days_left = result[0]
		print 'SERIAL_ID:%s\nPURCHASE_DATE:%s\nCOVERAGE_DATE:%s\nDAYS_LEFT:%s' \
	        % (s, start_date, end_date, days_left)



More information about the Linux-PowerEdge mailing list