Skip to content

Send latest mega sena results contest via email

License

Notifications You must be signed in to change notification settings

tcelestino/mega-sena-results

Repository files navigation

Mega Sena Results

Send the latest Mega Sena results contest via email with web scraping and Github Actions

Requirements

Dependencies

Installation

Clone repo

git clone git@github.com:tcelestino/mega-sena-results.git

Install the packages

yarn install

Rename .env.example to .env

Environments variables

Variable Description Value
EMAIL_SERVICE Service email gmail
EMAIL_HOST Configure SMTP host smtp.gmail.com
EMAIL_PORT Set port to host 465
EMAIL_USER Email your_email@gmail.com
EMAIL_PASS Password email --
EMAIL_FROM Set email from something@email.com
PAGE_URL Page to scraping results https://noticias.uol.com.br/loterias/mega-sena/

EMAIL_PASS - if you use Gmail as email service and if you are using 2FA you would have to create an “Application Specific” password for Nodemailer to work. Click here

How to use

Local

Set enviroments and run:

yarn start

On Github Actions

Create Secrets with environments variables.

Actually the action will run at 6am on wednesday, friday and sunday. You can change this schedule in .github/workflow/runner.yml.

name: Main pipeline
on:
  schedule:
    - cron: '00 09 * * 3,5,0' # at 6am (UTC -3) on wednesday, friday and sunday
    ...

Is wrong? No!! Github Actions does not enable to timezone settings. This schedule is based on UTC (-3h). Read more here

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature or git checkout -b issue-{number}
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature or git push origin issue-{number}
  5. Submit a pull request

TODO

See issues or the kanban

Credits

@tcelestino

License

MIT

About

Send latest mega sena results contest via email

Topics

Resources

License

Stars

Watchers

Forks