MATLAB Answers

How to change date in a website page

36 views (last 30 days)
Adriano on 23 Sep 2020
Commented: Ameer Hamza on 23 Sep 2020
Hi all,
I have a problem: I need to change the "Date Range" in this webpage and than read the code using "webread" function:
As you can see, the standard range when the web is opening is the last 30 days, and I would like to change it. I tried with this code:
temp = webread('');
temp2 = strrep(temp,'2020/08/24','2020/07/24')
but i don't know how to reload the webpage with the new html code and date range. Someone can help me? Thanks!

Accepted Answer

Ameer Hamza
Ameer Hamza on 23 Sep 2020
It is not as simple as using strrep(). You need to be able to control webpages interactively. I don't think MATLAB has any useful functions for such a thing. Your best bet is to use a python package of a web driver like selenium: and see how can you interact with this webpage to change the date range. You can use the python libraries in MATLAB using resources at this link:
Ameer Hamza
Ameer Hamza on 23 Sep 2020
Thanks Rik for the information.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!