How to make sure a web page is entirely loaded before using webread

9 次查看(过去 30 天)
Hello,
While scraping data from a website, I don't have any issue for the main part of it, except for a data table; the latter is made available as its elements can be observed while inspecting the html/webpage.
My assumption is that the webpage requires some time in order to be fully loaded, before using using webread properly.
A timeout parameter or a simple for loop until success do not allow to fix the issue. Similarly, I don't mind loading text data instead of a table, as this is not the real problem here.
So all in all, I'm trying to find a way to open/fully load a web page and use this latter output as an argument/input to webread in a second step. Unless a specific parameter related to webread or weboptions exists and allows to address the issue.
Thanks for your help!
  11 个评论
Rik
Rik 2023-1-2
编辑:Rik 2023-1-2
I would venture the guess that it has to do with cookies, which are tricky to deal with in the context of a simple webread.
tom3w
tom3w 2023-1-2
编辑:tom3w 2023-1-2
@Rik Yes it's a very likely possibility. Let's hope Matlab's tech/dev team will review different use cases in the perspective of improving or better documenting webread/weboptions.
Thanks all for your questions and suggestions, I could eventually fix my main issue.

请先登录,再进行评论。

回答(0 个)

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by