How to scrape values from a dynamically loaded web page?

3 visualizaciones (últimos 30 días)
Mehran Rahmani
Mehran Rahmani el 9 de Oct. de 2020
Editada: Mehran Rahmani el 25 de Oct. de 2020
The issue was addressed by finding the API webpage of the main website. Then, I requsted an API-Key via an online form. They provided me an API key for accessing some basic data. However, more data needed a paid membership.
  2 comentarios
Vinod
Vinod el 9 de Oct. de 2020
Editada: Vinod el 9 de Oct. de 2020
Rather than scrape the dynamic page, do they have an API you can use? I looked it up and it appears barchart.com has an API.
Mehran Rahmani
Mehran Rahmani el 10 de Oct. de 2020
Thanks Vinod for your helpful hint. I submitted a form on their webpage requesting access to their API. I assume they will send me an API Key, correct? I am currently awaiting their response and will comment when I tried their Key to fetch the data.

Iniciar sesión para comentar.

Respuestas (1)

Ameer Hamza
Ameer Hamza el 9 de Oct. de 2020
Text Analytics toolbox provides an html parser: https://www.mathworks.com/help/textanalytics/ug/parse-html-and-extract-text-content.html. However, if you don't have a toolbox, then you may need to use regexp or textscan().
  1 comentario
Mehran Rahmani
Mehran Rahmani el 10 de Oct. de 2020
Thanks for your response. Similar to "urlfiler()" and "webread()", the textscan() does not read the numeric values dynamically loaded to the page. As Vinod noted above, the values should be fetched through the webpage API. I am yet to to try it.

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  ThingSpeak Community

Categorías

Más información sobre ThingSpeak en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by