0
I need to extract the sales data of semi-new cars on some websites.
One of the sites is the Locamerica company. However, on her website does not appear in the HTML page the content I need to extract.
I need to extract the data from each car present on the page, but they do not appear in HTML. Not even external links to the car page appear.
I downloaded the source code, ran it and it appears the same site but without any car. Link of the HTML that appears to me
I am programming in python and I use Requests to get the page HTML and Beutiful Soup to extract the data I need.
The code
import requests as req
from bs4 import BeautifulSoup as bs
url = "https://seminovos.locamerica.com.br/seu-carro?combustivel=&cor=&q=&cambio=&combustiveis=&cores=&acessorios=&estado=0&loja=0&marca=0&modelo=0&anode=&anoate=&per_page={}&precode=0&precoate=0"
indice_pagina = 1
r = req.get(url.format(indice_pagina))
print(r.text)
How do they not appear? I entered there and inspected the code and all this there... picture price, etc etc etc, including they use Bootstrap...
– hugocsl
I’m not a web developer. I deal more with the data analysis part. I’m really not seeing these details. It’s something to do with Bootstrap?
– Rafael Ribeiro
Enter their site, press Ctrl+u that will open the source code of the page, then press Ctrl+f and search for price for example and you will see that this... I saw that they use bootstrap because it’s full of classes that they use in their framework
– hugocsl
I searched price and gave 43 Chequees, but none with which I wanted. I downloaded the source code, ran it and opened the page without the cars.
– Rafael Ribeiro