Skip to content

leoelios/megasena-scrapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mega-Sena Scrapping

Scrapping all historic result data of raffle and saving in mongodb database, already exists the Official API of Loteria, but this project it will be done for student purposes.

πŸ’ͺ What is the motivation ?

The project is building for filter all results history using a API for GET the data filtered according with the seted params in search. This is a start and a little part of the system like a all.

Libraries and Frameworks

  • PuppeteerJs (Chrome automation)
  • Axios (GET and POST requests)
  • Cheerio (Manipulation of data returned of Axios and Puppeteer)

✍ Pre-requisites

πŸ‘‰ Installing and Running

  1. Cloning the repository
    git clone https://github.com/leoelias023/megasena_scrapping.git

  2. Installing all dependences
    yarn

  3. Set your connection string mongodb
    Create archive .env and inside set DB_USER, DB_PASSWORD
    Example: mongodb://localhost:27017

  4. Running Project
    yarn start

πŸ”” Ready functions

manipulation.deleteAll()

Delete all informations in table Draw, reset all data for a possible restart

manipulation.show(Number number)

Return the count of all draws that have the number passed as an argument

manipulation.getMinorAndBigger(Array show())

Return the bigger and minor currencly and the number

About

πŸ’΅ Scrapping all historic result data of raffle and saving in mongodb database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published