来自Web -DataSource.Error的数据 - 无法检索页面内容

发布于 2025-02-09 14:45:09 字数 2144 浏览 1 评论 0 原文

我正在尝试从网页上获取表,但是我似乎无法让PowerBi正确加载该页面。

URL为 https://www.argentorshop.be/verkoop-uw-edelmetaal-aan-aan-argentorshop/verkoop-uw--uw-goudstaven-en-of-goudstaven-en-of-gouden-gouden-munten-munten-aan-aan-aan-argentor/

M试图导入的是 Gold Koersen 表,在此屏幕截图中以黄色突出显示。

但是,输入URL后,我得到了

后跟 datasource.error
我们无法检索网页的内容。

我已经尝试添加 http请求标头命令超时,但似乎没有任何作用。

我还尝试首先使用另一个(工作)网页,并在 source 步骤中修改URL

Source = Web.BrowserContents("https://www.w3schools.com/html/html_tables.asp")

更改为,

Source = Web.BrowserContents("https://www.argentorshop.be/verkoop-uw-edelmetaal-aan-argentorshop/verkoop-uw-goudstaven-en-of-gouden-munten-aan-argentor/")

但会产生相同的错误。

另外,尝试在 options 中等待特定的选择器 web.browsercontents(url,options)通过 [waitfor = [selector =“ #verkopen&gt.bootstrap-table”; >不做这个问题。

有人知道在PowerBi中正确导入该表的方法吗?

I'm trying to get a table from a webpage, but I cannot seem to get PowerBI to correctly load that page.

The url is https://www.argentorshop.be/verkoop-uw-edelmetaal-aan-argentorshop/verkoop-uw-goudstaven-en-of-gouden-munten-aan-argentor/

The table I'm trying to import is the GOLD KOERSEN table, highlighted in yellow in this screenshot.
GOLD KOERSEN table

However, after entering the url, I get
Connecting

Followed by DataSource.Error
We were unable to retrieve the contents of the web page.
DataSource.Error

I already tried adding HTTP request headers and Command timeout but nothing seems to work.
From Web - advanced

I also tried to first use a different (working) webpage, and modify the url in the Source step

Source = Web.BrowserContents("https://www.w3schools.com/html/html_tables.asp")

changed to

Source = Web.BrowserContents("https://www.argentorshop.be/verkoop-uw-edelmetaal-aan-argentorshop/verkoop-uw-goudstaven-en-of-gouden-munten-aan-argentor/")

but it yields the same error.

Also, trying to wait for a specific Selector in the options of Web.BrowserContents(url,options) by using [WaitFor = [Selector = "#verkopen > div.bootstrap-table"]] doesn't do the trick.

Does anyone know of a way to correctly import that table in PowerBI?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十级心震 2025-02-16 14:45:09

尝试一下。

let
    Source = Web.Contents(
    "http://www.argentorshop.be/nl/graphql",
    [
        Headers=[
            #"Method"="POST",
            #"Content-Type"="application/json"
        ],
        Content=Text.ToBinary("{""query"": ""{sellMetalsGrid (metals: [GOLD]){products {entity_id,name,purchasing_price,buying_premium,spread_percentage,spread_currency,selling_premium,price,image,short_description,product_type,fine_metal_content,metal,url,stock_status}}}""}")
    ]
    ),
    #"JSON" = Json.Document(Source),
    data = JSON[data],
    sellMetalsGrid = data[sellMetalsGrid],
    products = sellMetalsGrid[products],
    #"Converted to Table" = Table.FromList(products, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"entity_id", "name", "purchasing_price", "buying_premium", "spread_percentage", "spread_currency", "selling_premium", "price", "image", "short_description", "product_type", "fine_metal_content", "metal", "url", "stock_status"}, {"Column1.entity_id", "Column1.name", "Column1.purchasing_price", "Column1.buying_premium", "Column1.spread_percentage", "Column1.spread_currency", "Column1.selling_premium", "Column1.price", "Column1.image", "Column1.short_description", "Column1.product_type", "Column1.fine_metal_content", "Column1.metal", "Column1.url", "Column1.stock_status"})
in
    #"Expanded Column1"

Try this.

let
    Source = Web.Contents(
    "http://www.argentorshop.be/nl/graphql",
    [
        Headers=[
            #"Method"="POST",
            #"Content-Type"="application/json"
        ],
        Content=Text.ToBinary("{""query"": ""{sellMetalsGrid (metals: [GOLD]){products {entity_id,name,purchasing_price,buying_premium,spread_percentage,spread_currency,selling_premium,price,image,short_description,product_type,fine_metal_content,metal,url,stock_status}}}""}")
    ]
    ),
    #"JSON" = Json.Document(Source),
    data = JSON[data],
    sellMetalsGrid = data[sellMetalsGrid],
    products = sellMetalsGrid[products],
    #"Converted to Table" = Table.FromList(products, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"entity_id", "name", "purchasing_price", "buying_premium", "spread_percentage", "spread_currency", "selling_premium", "price", "image", "short_description", "product_type", "fine_metal_content", "metal", "url", "stock_status"}, {"Column1.entity_id", "Column1.name", "Column1.purchasing_price", "Column1.buying_premium", "Column1.spread_percentage", "Column1.spread_currency", "Column1.selling_premium", "Column1.price", "Column1.image", "Column1.short_description", "Column1.product_type", "Column1.fine_metal_content", "Column1.metal", "Column1.url", "Column1.stock_status"})
in
    #"Expanded Column1"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文