How to read a dynamic javascript-generated website?

Hello,
how can I read the contents of a website, which is generated dynamically by javascript?
If I use webread, I will only get the call of the javascript function:
<script src="JS/index.js"></script>
but not the contents itself.
Javascript is running inside the web browser (I use google chrome), so, can I read the output of the javascript function from the chrome browser somehow ..???
Thank you very much for your help!

댓글 수: 3

Doesn't the website offer an API to access the data you're after? Typically, webpages generated with javascript are for human consumption and a decent website would have a seperate way to access the same data programatically.
If not, then indeed webread does not execute the javascript so you would have to automate a web browser from matlab. Not impossible, but not a trivial task either.
The website doesn't offer an API.
You will need to look outside of Matlab for what you need. One option is to use Selenium. It has a java library which can be potentially integrated within matlab code.

댓글을 달려면 로그인하십시오.

답변 (0개)

제품

릴리스

R2018b

질문:

2019년 12월 18일

댓글:

2019년 12월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by