feat: working Puppeteer scraper for Promofarma
- Added Puppeteer with Chrome in Docker - Scraper extracts products using data attributes - Added /api/scrape endpoint - Tested: 10 products scraped from Promofarma The scraper now works with Promofarma's HTML structure which uses data-name, data-pvp attributes on article elements.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
"start": "node --env-file-if-exists=.env src/server.js",
|
||||
"dev": "node --env-file-if-exists=.env --watch src/server.js",
|
||||
"seed": "node --env-file-if-exists=.env scripts/seed.js",
|
||||
"scrape": "node --env-file-if-exists=.env scripts/scrape-puppeteer.js",
|
||||
"test": "NODE_OPTIONS='--experimental-vm-modules' npx jest --ci --forceExit --forceExitTimeout=30000"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -16,6 +17,7 @@
|
||||
"express-rate-limit": "^8.5.2",
|
||||
"mongoose": "^8.8.0",
|
||||
"morgan": "^1.10.0",
|
||||
"puppeteer": "^22.0.0",
|
||||
"swagger-jsdoc": "^6.2.8",
|
||||
"swagger-ui-express": "^5.0.0",
|
||||
"axios": "^1.6.0"
|
||||
|
||||
Reference in New Issue
Block a user