How do I scrape a website using MATLAB?

I want to scrape the text data from a table on a website. I have used urlfilter but this only scrapes numbers.

Réponses (1)

Image Analyst
Image Analyst le 18 Juil 2014
Modifié(e) : Image Analyst le 18 Juil 2014

1 vote

Use urlread() to get everything.

4 commentaires

azizullah khan
azizullah khan le 18 Juil 2014
thanks for reply,,, but i want to copy text from site which contains table i want a code which himself copy data from the web which i required and display it to me in matlab but i have a problem in coping the data..i can copy numbers from table but not the texual data...please help me...thanks
Image Analyst
Image Analyst le 18 Juil 2014
You mean urlread gets only numbers for you? For me it gets everything, just as if you'd right clicked on the page and said "View Source". I know it's HTML and it will look like a mess and you'll have to parse it out, but what do you expect?
azizullah khan
azizullah khan le 19 Juil 2014
i have a web which further consist of 200 pages Every page contain table i want to extract some data from the table not all data and make a table from all these pages. and save the data in excel. if you have any kind of idea share it with me.. Bundle of thanks
Image Analyst
Image Analyst le 20 Juil 2014
I don't have anything beyond urlread() for that. There is not going to be any built-in code that know exactly how your 200 web pages are laid out and how to extract the table from all the rest of the HTML code that is retrieved. There are billions of web pages out there and they just don't a page parser for all of them, or even yours. You're going to have to do that yourself.

Connectez-vous pour commenter.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by