How to extract table data of web page in matlab?

2 ビュー (過去 30 日間)
Bilal qureshi
Bilal qureshi 2018 年 6 月 22 日
コメント済み: Walter Roberson 2018 年 6 月 22 日
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??????

回答 (0 件)

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by