fantasta-scraper
v1.0.4
Published
A web scraper npm package to get all live Serie A players and export them wherever you like.
Downloads
1
Readme
Fantasta Web Scraper
A web scraper npm package to get all live Serie A players and export them wherever you like.
It gets the fantacalcio players from https://www.fantacalcio.it/app-fantaasta
Images and other player informations are gathered from https://www.legaseriea.it/it/serie-a/calciatori
Usage (locally)
// Install
yarn add fantasta-scraper
// Run
npx fantasta-scraper run
you will be prompted to input fantacalcio.it login credentials.
Then you have the choice to save the processed player file locally or remotely to a bucket url.
Concept
It will get fantacalcio players from https://www.fantacalcio.it/app-fantaasta, by downloading the csv. It will process the csv data into json and save the result in memory.
Then it will scrape https://www.legaseriea.it/it/serie-a/calciatori , puppeteer will autoscroll until reached bottom of the page (to get all paginated results) and then will retrieve through html the players data.
We will merge the fantacalcio players with the lega serie A players, and it will retrieve only the necessary information.
Once done, it will save locally or remotely the json file.