Skip to content

Commit

Permalink
Add watcher for marathon, marathon2 and marathon-infinity
Browse files Browse the repository at this point in the history
The download link does not contain version information but
the header information contains the file location which
has version information.
  • Loading branch information
Christoph Korn committed Jan 5, 2014
1 parent 69edfee commit b627ae0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions marathon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python
import httplib

for game in ("marathon", "marathon2", "infinity"):
conn = httplib.HTTPConnection("marathon.sourceforge.net")
conn.request("HEAD", "/download/data.php?game=%s"%(game))
res = conn.getresponse()
print "<!-- %d %s -->"%(res.status, res.reason)
h = res.getheaders()
for k,v in h:
if k == "location":
print "<a href='%s'>%s</a><br/>\n"%(v,v)
1 change: 1 addition & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ python the-powder-toy.py > the-powder-toy.html 2> the-powder-toy.log
python tide.py > tide.html 2> tide.log
python sandboxgamemaker.py > sandboxgamemaker.html 2> sandboxgamemaker.log
python codeslayer.py > codeslayer.html 2> codeslayer.log
python marathon.py > marathon.html 2> marathon.log

0 comments on commit b627ae0

Please sign in to comment.