diff -r 1b8ed3598305 -r c1b745b16f58 downloadkit/downloadkit.py --- a/downloadkit/downloadkit.py Tue Jun 29 21:56:25 2010 +0100 +++ b/downloadkit/downloadkit.py Wed Jun 30 16:19:02 2010 +0100 @@ -26,7 +26,7 @@ import hashlib import xml.etree.ElementTree as ET -version = '0.17' +version = '0.18' user_agent = 'downloadkit.py script v' + version headers = { 'User-Agent' : user_agent } top_level_url = "https://developer.symbian.org" @@ -312,13 +312,15 @@ try: response = urllib2.urlopen(req) chunk = response.read(CHUNK) - if chunk.find('
') != -1: + if chunk.find('
') != -1: # our urllib2 cookies have gone awol - login again + if options.debug: + print "Redirected to login page? login again.." login(False) req = urllib2.Request(url, None, request_headers) response = urllib2.urlopen(req) chunk = response.read(CHUNK) - if chunk.find('
') != -1: + if chunk.find('