Clear Filters
Clear Filters

How can I read web page on-line with this code? Reply me pls

2 views (last 30 days)
clear all; clc;
%strContents = fileread('008.html');
files = dir('*.html');
%hits = findstr(File,'services');
filename = 'FULLTEXT21.xlsx';
Sheet = 1;
xlRange = 'B135:B550';
for i = 1:435
%eval(['load ' files(i).name ' -ascii']);
expr ='<(title).*?>.*?</\1>';
strContents = fileread((files(i).name));
[tok mat nam] = regexpi(strContents, expr, 'tokens', 'match', 'names');
t = regexprep(mat,'<.*?>', '');
%abc(1,i)=t;
%fprintf('\n\n \t\ti=%d\n\n',i);
%pattern = '<title>';
%k = strfind(t, pattern);
%for i = 1:131
%data = load(matfile(i).name);
%matfbciles = dir(fullfile('D','Matlab Files','Matlab Tutorial','course-cotrain-data','fulltext','course', '*.html'));
%str = strcat('D:\Matlab Files\Matlab Tutorial\course-cotrain-data\fulltext\course', int2str(i),'.html');
%use our logic here
%before proceeding to the next file
%save pgdb matfiles;
%filetext = fileread(matfiles(1).name);
%xlswrite(filename,t,Sheet,xlRange);
xlsappend(filename, t, Sheet);
%save firefly.txt
end;
We can read HTML files we have but how can we read HTML files from web-page directly.
If you have answer or any suggestions please reply to us.

Answers (0)

Categories

Find more on Environment and Settings 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!