I'm trying to create a crawler to extract some attribute data from vendor websites, which I can check based on our internal attribute database, and I'm new to import.io. I watched a bunch of videos, but although my syntax seems correct, my xpath override guide does not return attribute values. I have the following html code example:
<table> <tbody><tr class="oddRow"> <td class="label"> Adhesive Type‎</td><td> Epoxy‎ </td> </tr> <tr> <td class="label"> Applications‎</td><td> Hard Disk Drive Component Assembly‎ </td> </tr> <tr class="oddRow"> <td class="label"> Brand‎</td><td> Scotch-Weld‎ </td> </tr> <tr> <td class="label"> Capabilities‎</td><td> Sustainability‎ </td> </tr> <tr class="oddRow"> <td class="label"> Color‎</td><td> Clear Amber‎ </td>
I am trying to write xpath the following sibling statement to capture the "Color" through the import.io crawler. The xpath code when I select "Color":
//*[@id="attributeList"]/table/tbody/tr[5]/td[1]
I tried to use:
//*[@id="attributeList"]/table/tbody/tr/td[.="Color"]/following-sibling::td
But it does not capture the value of the color attribute from the table. I'm not sure if this has anything to do with odd and even classes? When I look at html this seems logical; color is "Color", and the attribute value is in the next bracket td.
Elizabeth VO
source share