def get_browser_versions(browser):
 html = get(settings.BROWSER_BASE_PAGE.format(browser=quote_plus(browser)))
 html = html.decode(u'iso-8859-1')
 html = html.split(u"<div id='liste'>")[1]
 html = html.split(u'</div>')[0]
 browsers_iter = re.finditer(u"\\?id=\\d+\\'>(.+?)</a", html, re.UNICODE)
 browsers = []
 for browser in browsers_iter:
  if (u'more' in browser.group(1).lower()):
   continue
  browsers.append(browser.group(1))
  if (len(browsers) == settings.BROWSERS_COUNT_LIMIT):
   break
 return browsers

def get_browser_versions ( browser ) : html = get ( settings . BROWSER_BASE_PAGE . format ( browser = quote_plus ( browser ) ) ) html = html . decode ( u'iso-8859-1' ) html = html . split ( u"<div id='liste'>" ) [ 1 ] html = html . split ( u'</div>' ) [ 0 ] browsers_iter = re . finditer ( u"\\?id=\\d+\\'>(.+?)</a" , html , re . UNICODE ) browsers = [ ] for browser in browsers_iter : if ( u'more' in browser . group ( 1 ) . lower ( ) ) : continue browsers . append ( browser . group ( 1 ) ) if ( len ( browsers ) == settings . BROWSERS_COUNT_LIMIT ) : break return browsers
very very hardcoded/dirty re/split stuff .