Hey, I need help on the following:
I have a .txt file with many URLs where each line is a diferent URL. Each URL contains only a bunch of text and numbers, nothing else. How do I create a function that reads that same .txt file, accesses each one those URLs and saves to my desktop a .txt that contains the data from that URL. One .txt file per URL.
Thank you for you time.
No products are associated with this question.
Did you check the help for fgetl()?
fid = fopen('fgetl.m'); urlString= fgetl(fid); while ischar(urlString) disp(urlString) urlString = fgetl(fid); webPageContents = urlread(urlString); % Save it, or whatever..... end fclose(fid);
Play games and win prizes!Learn more