I am trying to parse this code, It is a array of teams.
I want to get a list of
tables so I can then parse all the different data
This is what I am trying to do
It seems to find the BolwerList but when I try to find the tables under it it fails.
Note: I am using Erels MiniHtmlParser as a starting point
Attached is B4J program.
Please ANY help you can give.
BobVal
(Small sample of data reformatted to show more clearly)
<div class="pageSection bowlersSection"><h1 class="bowlerListTitle">Bowler List</h1>
<div class="table-responsive bowler-table leaderboard">
<table class="table table-striped nobreak bowlerTable">
<thead class="table-header">
<tr class="toprow">
<th class="text-center max-content-lane">Lane</th>
<th class="text-center max-content-team">Name</th>
<th class="text-center max-content-game">Avg</th>
<th class="text-center max-content-game">Ent<br>Avg</th>
<th class="text-center max-content-game">Hdcp</th>
<th class="text-center max-content-games">Games</th>
<th class="text-center max-content-game">Pins</th>
<th class="text-center max-content-high">Ind.<br>Points</th>
</tr>
</thead>
<tbody>
<tr class="table-team-header">
<td class="text-center">15</td>
<td class="bowler-team-name">24 - WE WANT STRIKES</td>
<td class="text-center">581</td>
<td class="text-center">581</td>
<td class="text-center">74</td>
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center"></td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Derrick Reagin</td>
<td class="text-center">191</td>
<td class="text-center">191</td>
<td class="text-center">27</td>
<td class="text-center">4</td>
<td class="text-center">731</td>
<td class="text-center">4</td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Lamont Pringle</td>
<td class="text-center">186</td>
<td class="text-center">186</td>
<td class="text-center">31</td>
<td class="text-center">4</td>
<td class="text-center">818</td>
<td class="text-center">4</td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Tracy Boiles</td>
<td class="text-center">204</td>
<td class="text-center">204</td>
<td class="text-center">16</td>
<td class="text-center">4</td>
<td class="text-center">734</td>
<td class="text-center">1</td>
</tr>
</tbody>
</table>
<table class="table table-striped nobreak bowlerTable">
<thead class="table-header">
<tr class="toprow">
<th class="text-center max-content-lane">Lane</th><th class="text-center max-content-team">Name</th><th class="text-center max-content-game">Avg</th><th
<div class="pageSection bowlersSection"><h1 class="bowlerListTitle">Bowler List</h1>
<div class="table-responsive bowler-table leaderboard">
<table class="table table-striped nobreak bowlerTable">
<thead class="table-header">
<tr class="toprow">
<th class="text-center max-content-lane">Lane</th>
<th class="text-center max-content-team">Name</th>
<th class="text-center max-content-game">Avg</th>
<th class="text-center max-content-game">Ent<br>Avg</th>
<th class="text-center max-content-game">Hdcp</th>
<th class="text-center max-content-games">Games</th>
<th class="text-center max-content-game">Pins</th>
<th class="text-center max-content-high">Ind.<br>Points</th>
</tr>
</thead>
<tbody>
<tr class="table-team-header">
<td class="text-center">15</td>
<td class="bowler-team-name">24 - WE WANT STRIKES</td>
<td class="text-center">581</td>
<td class="text-center">581</td>
<td class="text-center">74</td>
<td class="text-center"></td>
<td class="text-center"></td>
<td class="text-center"></td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Derrick Reagin</td>
<td class="text-center">191</td>
<td class="text-center">191</td>
<td class="text-center">27</td>
<td class="text-center">4</td>
<td class="text-center">731</td>
<td class="text-center">4</td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Lamont Pringle</td>
<td class="text-center">186</td>
<td class="text-center">186</td>
<td class="text-center">31</td>
<td class="text-center">4</td>
<td class="text-center">818</td>
<td class="text-center">4</td>
</tr>
<tr>
<td></td>
<td class="bowler-team-name"><div class="avatar"><img class="avatarIMG" src="Bowlero%20Watauga%20-%20BWI%20-%20Week%203%20-%209_26_22_files/pin-icon.png"></div>Tracy Boiles</td>
<td class="text-center">204</td>
<td class="text-center">204</td>
<td class="text-center">16</td>
<td class="text-center">4</td>
<td class="text-center">734</td>
<td class="text-center">1</td>
</tr>
</tbody>
</table>
<table class="table table-striped nobreak bowlerTable">
<thead class="table-header">
<tr class="toprow">
<th class="text-center max-content-lane">Lane</th><th class="text-center max-content-team">Name</th><th class="text-center max-content-game">Avg</th><th
I want to get a list of
B4X:
<table class="table table-striped nobreak bowlerTable">
This is what I am trying to do
B4X:
HtmlParser.Initialize
Dim root As HtmlNode = HtmlParser.Parse(File.ReadString(File.DirAssets, "LeaguePals.htm"))
'Find the table element
Dim BowlerList As HtmlNode = HtmlParser.FindNode(root, "div", HtmlParser.CreateHtmlAttribute("class", "table-responsive bowler-table leaderboard"))
Dim Tables As List = HtmlParser.FindDirectNodes(BowlerList, "table", HtmlParser.CreateHtmlAttribute("class", "table table-striped nobreak bowlerTable"))
It seems to find the BolwerList but when I try to find the tables under it it fails.
Note: I am using Erels MiniHtmlParser as a starting point
Attached is B4J program.
Please ANY help you can give.
BobVal