Skip to content

Scrape my Gmail to get some emails and download attachment

Notifications You must be signed in to change notification settings

BolajiOlajide/payslip

 
 

Repository files navigation

Payslip

Setup

  • Ensure Python 3.5+ is installed on your machine

  • Clone the repository with the command

git clone https://github.com/BolajiOlajide/payslip.git
  • Navigate to the project with the command
cd payslip
  • Install the dependencies with the command
pip install -r requirements.txt
  • Enable the GMAIL API for your email by navigating here, then click on the Enable the Gmail API button (Ensure you're signed with your Andela email before doing so, so it doesn't end up scraping your personal email lol.)

  • Once you click the button, a modal should appear - click the Download Client Configuration and move the downloaded credentials.json file to the root of the project.

screenshot

Scraping

Everything should be ready to go once the dependencies have been installed. To start scraping, simply run the command:

python main.py

You'll receive a prompt to enter the email sender whose email you'll love to scrape - if you're using this for the purpose of scraping payslips it should be the financial service handling your company's compensation thingy.

Anyways once you've entered a valid email, it should begin scraping and you should ideally find your files in the attachments directory.

Gracias!

Support me via Patreon

About

Scrape my Gmail to get some emails and download attachment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%