You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then, GetHotelsCom.js is very simple
import { hotelsCom, saveToJSON } from "hotels-scraper-js";
hotelsCom.getHotels().then(saveToJSON);
then, node GetHotelsCom.js
it occurs error
D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:258
throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails));
^
Error: Evaluation failed: TypeError: Cannot read properties of null (reading 'textContent')
at pptr://puppeteer_evaluation_script:7:38
at Array.map ()
at pptr://puppeteer_evaluation_script:2:121
at ExecutionContext._ExecutionContext_evaluate (D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:258:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:146:16)
at async getHotelsInfo (file:///D:/Web/hotelsScrap/hotels-scraper-js-main/node_modules/hotels-scraper-js/hotelsComParser/getHotelsComHotels.js:39:10)
at async getHotelsComHotels (file:///D:/Web/hotelsScrap/hotels-scraper-js-main/node_modules/hotels-scraper-js/hotelsComParser/getHotelsComHotels.js:361:19)
Node.js v18.17.1
can you help me?
The text was updated successfully, but these errors were encountered:
Hey guys, this package is no longer being maintained.
Regarding the issue both with Hotels.com and Airbnb. Most likely it's due to CSS selector change.
In other words, CSS selector on the website doesn't match CSS selector in the parser and thus it can't get anything from the website Cannot read properties of null (reading 'textContent')
first, I did below
npm i hotels-scraper-js
then, GetHotelsCom.js is very simple
import { hotelsCom, saveToJSON } from "hotels-scraper-js";
hotelsCom.getHotels().then(saveToJSON);
then,
node GetHotelsCom.js
it occurs error
D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:258
throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails));
^
Error: Evaluation failed: TypeError: Cannot read properties of null (reading 'textContent')
at pptr://puppeteer_evaluation_script:7:38
at Array.map ()
at pptr://puppeteer_evaluation_script:2:121
at ExecutionContext._ExecutionContext_evaluate (D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:258:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (D:\Web\hotelsScrap\hotels-scraper-js-main\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:146:16)
at async getHotelsInfo (file:///D:/Web/hotelsScrap/hotels-scraper-js-main/node_modules/hotels-scraper-js/hotelsComParser/getHotelsComHotels.js:39:10)
at async getHotelsComHotels (file:///D:/Web/hotelsScrap/hotels-scraper-js-main/node_modules/hotels-scraper-js/hotelsComParser/getHotelsComHotels.js:361:19)
Node.js v18.17.1
can you help me?
The text was updated successfully, but these errors were encountered: