# HG changeset patch # User darius # Date 1195376047 0 # Node ID 5058c26951099ae8d76f451c7d79aff9602cc8bf # Parent 294581b9c72fa8bad86b899138ff7870ec5edb7f Properly report if we can't parse the results. diff -r 294581b9c72f -r 5058c2695109 scrape-gm.py --- a/scrape-gm.py Fri Oct 19 07:53:00 2007 +0000 +++ b/scrape-gm.py Sun Nov 18 08:54:07 2007 +0000 @@ -5,7 +5,7 @@ # # Prints out matched player names agreated by server # -# $Id: scrape-gm.py,v 1.2 2007/10/19 07:53:00 darius Exp $ +# $Id: scrape-gm.py,v 1.3 2007/11/18 08:54:07 darius Exp $ ############################################################################ # # Copyright (C) 2007 Daniel O'Connor. All rights reserved. @@ -100,7 +100,7 @@ playertbl = s.find("table", "search_table") if (playertbl == None): - print "Unable to find results" + #print "Unable to find results" return None servertbl = playertbl.findNext("table", "search_table") @@ -153,7 +153,9 @@ servers = Server.Scrape(f) del f - if (len(servers) == 0): + if (servers == None): + print "No results available, please check manually" + elif (len(servers) == 0): print "No players found" else: i = 0