Mercurial > ~darius > hgwebdir.cgi > scrape-gm
comparison scrape-gm.py @ 8:fbaf34d7bab7
Only list Australian servers.
author | darius@inchoate.localdomain |
---|---|
date | Tue, 26 Feb 2008 16:49:48 +1030 |
parents | 825302e32c35 |
children | 0e18c714b69d |
comparison
equal
deleted
inserted
replaced
7:825302e32c35 | 8:fbaf34d7bab7 |
---|---|
145 print sys.argv[0] + "search_string" | 145 print sys.argv[0] + "search_string" |
146 sys.exit(1) | 146 sys.exit(1) |
147 | 147 |
148 try: | 148 try: |
149 #f = open("gm.html") | 149 #f = open("gm.html") |
150 f = urllib.urlopen("http://www.game-monitor.com/search.php?search=" + urllib.quote(sys.argv[1]) + "&type=player&location=AU") | 150 f = urllib.urlopen("http://www.game-monitor.com/search.php?location=AU&search=" + urllib.quote(sys.argv[1]) + "&type=player&location=AU") |
151 except IOError, e: | 151 except IOError, e: |
152 print "Unable to fetch page - " + str(e) | 152 print "Unable to fetch page - " + str(e) |
153 sys.exit(0) | 153 sys.exit(0) |
154 | 154 |
155 servers = Server.Scrape(f) | 155 servers = Server.Scrape(f) |