Effacer les filtres
Effacer les filtres

How to extract table data of web page in matlab?

1 vue (au cours des 30 derniers jours)
Bilal qureshi
Bilal qureshi le 22 Juin 2018
Commenté : Walter Roberson le 22 Juin 2018
How to extract web data from html table?
URL = 'http://www.mtmis.excise-punjab.gov.pk';
str = urlread(URL,'POST',{'vhlno','RIO-12-8074'});
expression = '<(table).*?</\1>';
matches = regexp(str,expression,'match')
OutPut is ::
'<table style="width: 100%">←↵ <tr>←↵ <td colspan="2"←↵ style="text-align: center;font-size: 22px;font-weight: bold;">Vehicle←↵ Details←↵ </td>←↵ </tr>←↵ <tr>←↵ <td>Registration Number:</td>←↵ <td>RIO-12-8076</td>←↵ </tr>←↵ <tr>←↵ <td>Chassis Number:</td>←↵ <td>A260576</td>←↵ </tr>←↵ <tr>←↵ <td>Engine Number:</td>←↵ <td>B260576</td>←↵ </tr>←↵ <tr>←↵ <td>Make Name:</td>←↵ <td>METRO - MR-70</td>←↵ </tr>←↵ <tr>←↵ <td>Registration Date:</td>←↵ <td>05-Nov-2012 12:00 AM</td>←↵ </tr>←↵ <tr>←↵ <td>Model:</td>←↵ <td>2012</td>←↵ </tr>←↵ <tr>←↵ <td>Vehicle Price:</td>←↵ <td>41,810</td>←↵ </tr>←↵ <tr>←↵ <td>Color:</td>←↵ <td>RED</td>←↵ </tr>←↵ <tr>←↵ <td>Token Tax Paid upto:</td>←↵ <td>January 1970</td>←↵ </tr>←↵ <tr>←↵ <td colspan="2"←↵ style="text-align: center;font-size: 22px;font-weight: bold;">Owner←↵ Details←↵ </td>←↵ </tr>←↵ <tr>←↵ <td>Owner Name</td>←↵ <td>NAJAM BUTT</td>←↵ </tr>←↵ <tr>←↵ <td>Father Name</td>←↵ <td>MUHAMMAD NAEEM</td>←↵ </tr>←↵ <tr>←↵ <td>Owner City</td>←↵ <td>RAWALPINDI</td>←↵ </tr>←↵ </table>'
How to seprate Details name, engine num, Chassis Number etc??????

Réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by