Up[dates to make things to work after new buildbot site was deployed
This commit is contained in:
@@ -10,30 +10,23 @@ BUILDBOT_DOWNLOAD_URL = BUILDBOT_URL + "download/"
|
||||
class BuildbotHTMLParser(HTMLParser):
|
||||
def __init__(self):
|
||||
HTMLParser.__init__(self)
|
||||
self._is_inside_official_table = False
|
||||
self._is_official_table_finished = False
|
||||
self.official_builds = []
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
tag_lower = tag.lower()
|
||||
if tag_lower == 'a':
|
||||
if self._is_inside_official_table:
|
||||
for attr in attrs:
|
||||
if attr[0].lower() == 'href':
|
||||
href = attr[1]
|
||||
self.official_builds.append(href)
|
||||
for attr in attrs:
|
||||
if attr[0].lower() == 'href':
|
||||
href = attr[1]
|
||||
if href.startswith("/download/"):
|
||||
self.official_builds.append(os.path.basename(href))
|
||||
elif tag_lower == 'table':
|
||||
classes = ()
|
||||
for attr in attrs:
|
||||
if attr[0].lower() == 'class':
|
||||
classes = attr[1].lower().split()
|
||||
if 'table-striped' in classes:
|
||||
if self._is_inside_official_table:
|
||||
self._is_inside_official_table = False
|
||||
self._is_official_table_finished = True
|
||||
else:
|
||||
if not self._is_official_table_finished:
|
||||
self._is_inside_official_table = True
|
||||
pass
|
||||
|
||||
def handle_endtag(self, tag):
|
||||
pass
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import configparser
|
||||
from .. import foundation
|
||||
from ..foundation import util
|
||||
from . import util
|
||||
import os
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user