1.0.4 • Published 7 months ago

fantasta-scraper v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

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.