Web查询中表格中缺少CSS元素。

huangapple go评论59阅读模式
英文:

Web Query missing css elements in the table

问题

我在使用网络查询NCSL免责选民表(<https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee>)。该表使用此元素来标记我想显示为true的单元格:

&lt;td&gt;
     &lt;ul&gt;
          &lt;li&gt;::before
          &amp;nbsp;&lt;/li&gt;
     &lt;/ul&gt;
&lt;/td&gt;

当我查询时,无法将这些单元格视为包含任何内容。我漏掉了什么?

英文:

I using a web query on the NCSL Excuse Absentee Voting Table (<https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee>). The table uses this element to mark cells that I would like to show as true:

&lt;td&gt;
     &lt;ul&gt;
          &lt;li&gt;::before
          &amp;nbsp;&lt;/li&gt;
     &lt;/ul&gt;
&lt;/td&gt;

When I query this I cannot get it to read those cells as having anything in them. What am I missing?

答案1

得分: 1

这似乎有效。在处理之前,将项目符号替换为XXX。

let Source = Web.Contents("https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee"),
    Source1 = Text.Combine(Lines.FromBinary(Source, null, null, 65001)),
    Source2 = Text.Replace(Source1, "<ul><li>&nbsp;</li></ul>", "XXX"),
    Source3 = Web.Page(Source2){0}[Data]
in Source3
英文:

This seems to work. Replaces the bullet with XXX before processing

let Source = Web.Contents(&quot;https://www.ncsl.org/elections-and-campaigns/table-2-excuses-to-vote-absentee&quot;),
Source1= Text.Combine(Lines.FromBinary(Source, null, null, 65001)),
Source2=Text.Replace(Source1,&quot;&lt;ul&gt;&lt;li&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&quot;,&quot;XXX&quot;),
Source3=Web.Page(Source2){0}[Data]
in Source3

Web查询中表格中缺少CSS元素。

Web查询中表格中缺少CSS元素。

huangapple
  • 本文由 发表于 2023年5月25日 21:26:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76332823.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定