XPATH to extract data from CarWale.com? -


with friend made script extract specs , features pages http://www.carwale.com/mercedesbenz-cars/e-class/e63amg-3049/ , works not perfectly.

he told me use xpath //tr[contains (.,"feature name")]/td[2], 1 of them impossible pick, using //tr[contains (.,"display")]/td[2] extract 4 features containing word display. there way pick 1 labelled display?

<td>trip meter</td><td>multi-function display </td> <td>heads display (hud)</td><td>no </td> <td>display</td><td>lcd display </td> <td>display screen rear passengers</td><td>no </td> 

i extracted car color names using xpath //div[@class='colorname']

i want car color rgb values, or whole style code , remove unneeded code using find/replace, xpath need?

<div class="colours" style="background-color: #040404; height: 30px; width: 130px; margin: 7px"></div> 

extract 'td' tag containing 'display' if it's preceding sibling contains 'display':

//tr/td[contains(.,'display')]/following-sibling::td[contains(.,'display')] 

extract rgb hex string:

//div/substring-before(substring-after(@style,'background-color: '),';') 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -