import os
import urllib
import re
import time
proxies = {'http': 'http://127.0.0.1:8118'}
links=["http://www.pennergame.de/change_please/******/"]
while len(links) > 0:
time.sleep (4)
print "Oeffne Spendenlink........"
for link in links:
f=urllib.urlopen(link,proxies=proxies)
antwort=f.read()
print "Antwort........"
e = re.compile('Du hast &euro.\d+.\d{2} in .*').findall(antwort)
if e:
print e
elif re.compile('hat heute schon genug Spenden erhalten').findall(antwort):
print "Link",link,"hatte schon genug Spenden ."
elif re.compile('Du kannst erst in').findall(antwort):
print "Spenden ist erst spaeter moeglich."
else:
print "Das hat wohl nicht geklappt"