forked from ckorn/Upstream-watchers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Christoph Korn
committed
Jan 5, 2014
1 parent
69edfee
commit b627ae0
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters