# HG changeset patch # User William Roberts # Date 1268506572 0 # Node ID 04b0678959bfbe211fcaf927515d74a3bc11e5f0 # Parent 32417d4f42daa62409b4ef902e3429000eb254e6 v0.14 - handle the version checking in the "(Public)" download page as well diff -r 32417d4f42da -r 04b0678959bf downloadkit/downloadkit.py --- a/downloadkit/downloadkit.py Sat Mar 13 18:50:17 2010 +0000 +++ b/downloadkit/downloadkit.py Sat Mar 13 18:56:12 2010 +0000 @@ -26,7 +26,7 @@ import hashlib import xml.etree.ElementTree as ET -version = '0.13' +version = '0.14' user_agent = 'downloadkit.py script v' + version headers = { 'User-Agent' : user_agent } top_level_url = "https://developer.symbian.org" @@ -405,8 +405,8 @@ soup=BeautifulSoup(doc) # check that this is the right version - match = re.search('Platform Release v(\d\.\d\.[0-9a-z]+)', doc, re.IGNORECASE) - if match and match.group(1) != version: + match = re.search('Platform Release (\(Public\) )?v(\d\.\d\.[0-9a-z]+)', doc, re.IGNORECASE) + if match and match.group(2) != version: print "*** ERROR: version %s is not available" % version print "*** the website is offering version %s instead" % match.group(1) return 0