Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:258 #6

Open
Volodymyr1593 opened this issue Jan 27, 2024 · 1 comment

Comments

@Volodymyr1593
Copy link

When try to use : hotelsScraper.booking.getHotelInfo();

getting eror:
Puppeteer old Headless deprecation warning:
In the near feature headless: true will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing headless: "new" to puppeteer.launch()
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

D:.NET\ASP.NET.projekts\MVC\2.Pr(Scraper Data for TravelLink)\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:19:44
at Array.map ()
at pptr://puppeteer_evaluation_script:18:70
at ExecutionContext._ExecutionContext_evaluate (D:.NET\ASP.NET.projekts\MVC\2.Pr(Scraper Data for TravelLink)\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:.NET\ASP.NET.projekts\MVC\2.Pr(Scraper Data for TravelLink)\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:146:16)
at async getHotelInfo (file:///D:/.NET/ASP.NET.projekts/MVC/2.Pr(Scraper%20Data%20for%20TravelLink)/node_modules/hotels-scraper-js/bookingParser/getBookingHotelInfo.js:6:10)
at async getBookingHotelInfo (file:///D:/.NET/ASP.NET.projekts/MVC/2.Pr(Scraper%20Data%20for%20TravelLink)/node_modules/hotels-scraper-js/bookingParser/getBookingHotelInfo.js:73:21)
at async file:///D:/.NET/ASP.NET.projekts/MVC/2.Pr(Scraper%20Data%20for%20TravelLink)/index.js:5:15

Node.js v18.18.2
PS D:.NET\ASP.NET.projekts\MVC\2.Pr(Scraper Data for TravelLink)>

Browser: Chrome

@dimitryzub
Copy link
Owner

dimitryzub commented Feb 13, 2024

This package is no longer being maintained.

Most likely it's due to CSS selector change on Hotels.com which doesn't match CSS selector(s) in the parser: Cannot read properties of null (reading 'textContent')

To fix it, you need to change CSS selector(s) in the parser:
https://github.com/dimitryzub/hotels-scraper-js/blob/main/hotelsComParser/getHotelsComHotelInfo.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants