I am working on a project to scrape data from the following website:
I am using Node JS & have used Puppeteer. I have managed to scrape everything except price of a hotel from the website. I am attaching the screenshot to point out what price I am interested in to scrape.
I have tried the following variations but they all return null or empty values. I am not sure what is going on:
const price = element.querySelector('.main_gate-price .currency_font currency_font--gbp').textContent;
const price = element.querySelector('.currency_font currency_font--gbp').textContent;
const price = element.querySelector('.card-main_gate .main_gate-price_info .currency_font.currency_font--gbp').innerText;
I have used the above variations with “textContent”, “innerHTML”, “innerText” but nothing when it clearly seems that the price is stored as a text node in the span element with class “currency_font currency_font–gbp”.
Can someone please assist & point me in right direction? The image I was referring to for reference: