I have about 6000 url's that are links to a wiki that has text on it that i need, is there a way to grab the data from the website because i have tried urlread and i cant seem to get the data out of the html string once ive done that.
That is a link to one of the url's i have, they are all the same. the text i'm trying to get is level 'ATK/DEF' etc

 채택된 답변

Image Analyst
Image Analyst 2014년 12월 3일
편집: Image Analyst 2014년 12월 3일

1 개 추천

Did you try strfind? Like
contents = urlread(urlSearchAddress);
searchString = 'ATK/DEF';
location = strfind(contents, searchString);

댓글 수: 4

Daniel Wray
Daniel Wray 2014년 12월 3일
Its not currently working but i might be able to get it to work. if i was to use this, how would i separate the text from the string only knowing the position of it in the html
What is there to separate if you already know what you're going to extract? If you wanted to take, say, 30 characters past that location, you could do
subString = contents(location:(location+29));
Daniel Wray
Daniel Wray 2014년 12월 3일
Thats exactly what i needed, sorry for being vague, im not used to using matlab with strings is all so i've no idea how to explain what i want xD
Image Analyst
Image Analyst 2014년 12월 3일
You're welcome. Could you mark the Answer as "Accepted" if you have no more questions.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2014년 12월 3일

댓글:

2014년 12월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by