1
Hello, I’m trying to do a scraping where I have to pick up a link and text but I’m struggling because of page variations. I have three possible variations:
1.
<div>
<strong>
<span style="font-family: arial, helvetica, sans-serif;">
<a href="www...com.br" target="_blank">Edição</a> -
</span>
</strong>
<span style="font-family: arial, helvetica, sans-serif;">01/12/2017
</span>
</div>
2.
<div>
<span style="font-family: arial, helvetica, sans-serif;">
<a href="www...com.br">
<strong>Edição</strong>
</a> - 04/12/2017
</span>
</div>
3.
<div>
<a href="www...com.br">
<strong>Edição</strong>
</a> - 05/12/2017
</div>
I need to get the link inside the href and the date. The link I can pick up with
response.xpath('//a[contains(@href,"www...com.br")]')
I’m not getting the date. I’m trying to find a solution where I can get the link and the date within these code variations.
Thanks in advance for your help.
You can post which page you are trying to parse?
– Laerte
Página:http://www.uberlandia.mg.gov.br/? pagina=Conteudo&id=3077
– Júnior Carvalho