Hello and greetings.
I have the following script:
IETagEventByAttrib>http://www.buscacep.correios.com.br/sis ... ,,04115000
IETagEventByAttrib>http://www.buscacep.correios.com.br/sis ... scar,click,
Wait>1
IEWait>http://www.buscacep.correios.com.br/sis ... dereco.cfm
I would like to capture the result element named Logradouro/Nome: "<td width="150">Rua Pedro Pomponazzi </td>", which is related to the following XPath: /html/body/div[1]/div[3]/div[2]/div/div/div[2]/div[2]/div[2]/table/tbody/tr[2]/td[1]
In order to achieve my goal, which is the correct way to use IETagEventByAttrib? Can I use a XPath reference here?
Best
Web Scraping - XPath
Moderators: JRL, Dorian (MJT support)
Re: Web Scraping - XPath
Hello,
Instead of using XPath, I found out another way to extract the desired element:
IEGetTagsByAttrib>{"http://www.buscacep.correios.com.br/sis ... valueArray
The valueArray_1 has the following content:
/*
<tbody><tr>
<th width="150">Logradouro/Nome:</th>
<th width="90">Bairro/Distrito:</th>
<th width="80">Localidade/UF:</th>
<th width="50">CEP:</th>
</tr>
<tr>
<td width="150">Rua Pedro Pomponazzi </td>
<td>Jardim Vila Mariana </td>
<td>São Paulo/SP </td>
<td width="55">04115-000</td>
</tr>
</tbody></table>
*/
Is there a MS (or VBScript) command to directly parse the 'cells' of my table?
Thanks
Instead of using XPath, I found out another way to extract the desired element:
IEGetTagsByAttrib>{"http://www.buscacep.correios.com.br/sis ... valueArray
The valueArray_1 has the following content:
/*
<tbody><tr>
<th width="150">Logradouro/Nome:</th>
<th width="90">Bairro/Distrito:</th>
<th width="80">Localidade/UF:</th>
<th width="50">CEP:</th>
</tr>
<tr>
<td width="150">Rua Pedro Pomponazzi </td>
<td>Jardim Vila Mariana </td>
<td>São Paulo/SP </td>
<td width="55">04115-000</td>
</tr>
</tbody></table>
*/
Is there a MS (or VBScript) command to directly parse the 'cells' of my table?
Thanks
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Web Scraping - XPath
I would use RegEx for this.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?