Download file from website without url
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
How do I download a file from a website without having a url?
More details:
I have the url for the "main" website where the file is located (it's in swedish): https://www.smhi.se/data/meteorologi/ladda-ner-meteorologiska-observationer/#param=precipitation24HourSum,stations=core,stationid=181970
The file that I want to download is the file you download when you click: 'Ladda ner data för de senaste fyra månaderna (.csv)'.
The problem that I have is that I can't seem to find the url for the download, since you need a url for the command 'webread' I am unable to download the file that I want with Matlab.
So I wonder if anyone knows how I can download the file without a url or if anyone is able to find the url for the download or if it's simply impossible without a url.
0 Commenti
Risposta accettata
Rik
il 14 Set 2023
Modificato: Rik
il 14 Set 2023
What you need to do, is use the inspection tools of your browser to track the requests your browser makes when downloading a file.
That allows you to extract the URL:
url='https://opendata-download.smhi.se/stream?type=metobs¶meterIds=5&stationId=181970&period=latest-months';
fn = websave('test.csv',url)
contents = fileread(fn);
disp(contents(1:floor(end/20)))
Note that the website clearly doesn't want you to do this, so you should limit what you do.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Downloads in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!