Can MATLAB control a website and extract data from it?

3 views (last 30 days)
I don't have any code for this as I have no idea where to start. My exerience with MATLAB is largely complex number crunching, and I have a bit of experience with reading files. The conecpt of what I'm trying to do would be similar to interacting with Google Maps. The website I'm interested in interacting with is this one:
I'm developing a program where a user can input their postcode (zipcode) or surburb which then queries a database to find the latitude and longitude of that location (the data for that is in my own database and this code is separate).
Once the lat/long is known, I wish to "click" at those coordinates on the map. I'm assuming this could also be acheived using web(url,opt) and inputing the lat/long in the url such as this example:
Is the "clicking" option even possible? I assume I'd need to extract the page data so MATLAB knows the window size and can determine the appropraite position of the cursur based on that - seems overly complex so I'm hoping that navigating to the url is a valid option.
Where I really need help is once I'm at the location, I want a way toretreive the relevent information as shown in the below image:
I have read the documentation for urlread2 which I thought might be a solution, but the options don't seem to be what I'm after (or I don't understand it well enough).
Any ideas?
Much appreciated,
Chris

Accepted Answer

Rik
Rik on 9 Sep 2022
Edited: Rik on 13 Sep 2022
My suggestion would be to look at the network tab of your browser's debugging tools to find out from where that data is loaded. Then you can probably directly query the backend data. You could get latitude and longitude with tools from the mapping toolbox (or if you're lucky, from the file exchange).
[moved to answer section]
  2 Comments
Rik
Rik on 13 Sep 2022
You're welcome.
When working with code it is often indeed easier to skip the step where the data is formatted for human readers.

Sign in to comment.

More Answers (0)

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by