From b627ae088ea6915571f3bdbd6ddf35c82c574558 Mon Sep 17 00:00:00 2001 From: Christoph Korn Date: Sun, 5 Jan 2014 12:59:02 +0100 Subject: [PATCH] Add watcher for marathon, marathon2 and marathon-infinity The download link does not contain version information but the header information contains the file location which has version information. --- marathon.py | 12 ++++++++++++ update.sh | 1 + 2 files changed, 13 insertions(+) create mode 100644 marathon.py diff --git a/marathon.py b/marathon.py new file mode 100644 index 0000000..da92bc9 --- /dev/null +++ b/marathon.py @@ -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 ""%(res.status, res.reason) + h = res.getheaders() + for k,v in h: + if k == "location": + print "%s
\n"%(v,v) diff --git a/update.sh b/update.sh index 93c00d9..8f17c10 100644 --- a/update.sh +++ b/update.sh @@ -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