mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-05 21:59:45 +00:00
tools: update Bluetooth SIG scrapers
This commit is contained in:
parent
2c68f1640c
commit
86f9f81a43
@ -48,7 +48,7 @@ def scrape_page(fout, url):
|
||||
print('-' * 70)
|
||||
|
||||
# get all <tr> elements in <table id="gattTable">
|
||||
rows = tree.xpath('//div[@class="table-time"]/table/tbody/tr')
|
||||
rows = tree.xpath('//div[@class="copy-block ta-left"]/table/tbody/tr')
|
||||
for row in rows:
|
||||
children = row.getchildren()
|
||||
data_type_value = children[0].text_content()
|
||||
|
@ -40,7 +40,7 @@ def scrape_page(fout, url):
|
||||
page = requests.get(url)
|
||||
tree = html.fromstring(page.content)
|
||||
# get all <tr> elements in <table id="gattTable">
|
||||
rows = tree.xpath('//table[@id="gattTable"]/tr')
|
||||
rows = tree.xpath('//table[@id="gattTable"]/tbody/tr')
|
||||
for row in rows:
|
||||
children = row.getchildren()
|
||||
summary = children[0].text_content()
|
||||
|
@ -38,7 +38,7 @@ def list_services():
|
||||
page = requests.get(url)
|
||||
tree = html.fromstring(page.content)
|
||||
# get all <tr> elements in <table id="gattTable">
|
||||
rows = tree.xpath('//table[@id="gattTable"]/tr')
|
||||
rows = tree.xpath('//table[@id="gattTable"]/tbody/tr')
|
||||
print("%-55s| %-30s| %s" % ('Specification Type', 'Specification Name', 'UUID'))
|
||||
print('-'*55 + '+-' + '-' * 30 + '+-' + '-'*10)
|
||||
maxlen_type = 0
|
||||
|
Loading…
Reference in New Issue
Block a user