Typescript scraper using Puppeteer. Used by Meu Mengão.
- Top 5 Flamengo news from Globo Esporte and Coluna do Fla;
- The latest video from Mauro Cezar Pereira, Venê Casagrande, William Godoy and FlaTV;
- All Flamengo matches and fixtures from Flashscore;
- It saves it all to a SQL database (optimally to a MySQL/MariaDB one)
Create a .env file in the project's root with your database information:
DB_HOST=localhost
DB_USER=youruser
DB_PWD=yourpassword
DB_PORT=3306
DB_NAME=meu_mengao
Then install the dependencies, compile the .ts
files and run the scraper:
$ npm install
$ npx tsc
$ node scraper.js
God no. But I really don't wanna refactor this, web scraping is painful, so I rather only experience its pain when some of the scraped sites break and I'm forced to update. Maybe I refactor in the future, but no promises...