We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fa447a7 + 45ed6a0 commit 5387c06Copy full SHA for 5387c06
1 file changed
Public/Get-HtmlTable.ps1
@@ -50,7 +50,9 @@ function Get-HtmlTable {
50
else {
51
$h = ConvertFrom-Html -Content $r.Content
52
if ($TableIndex -is [valuetype]) { $TableIndex += 1}
53
- $rows = $h.SelectNodes("//table[$TableIndex]//tr")
+ $rows = try {
54
+ $h.SelectSingleNode("//table[$TableIndex]").SelectNodes(".//tr")
55
+ } catch {}
56
if (-not $rows) {Write-Warning "Could not find rows for `"//table[$TableIndex]`" in $Url ."}
57
if ( -not $propertyNames) {
58
if ( $tableHeaders = $rows[$FirstDataRow].SelectNodes("th")) {
0 commit comments