Scrape emails from an existing email address on the basis of their subject containing keywords "Thank you for applying" and categorise them into a "job" category.
- User applies for a job and receives a confirmation email.
- The subject of the email contains the keywords "Thank you for applying".
- User applies for n number of jobs and receives n number of emails, subject containing the keywords "Thank you for applying".
- Filter out all the emails received after applying for a job.
Navigate to see all setting from your gmail page and follow steps listed below:
- Turn
off
the 2-step verification for your Gmail. Enable
IMAP access from setting in via Gmail.- Turn
on
access to less secure apps.
- When running the code for first time a google security check web page might open, click on check activity and again click and accept yes it was me. When running code for first time google might give you multiple security alert.
- If you run this code on python IDLE password entered might me echoed, so better use the command prompt to run the code.
import imaplib, email, getpass
import re
import zipfile
import numpy as np
import pandas as pd
import tensorflow as tf
import matplotlib.pyplot as plt
import io
import json
- The program takes two inputs from the user:
Gmail-ID
&Password
. - The code then retrieves all the mails where the subject has keyword "Thank you for applying".
- It is followed by extraction of job role specified in the mail.
- Then it is passed to a model which makes use of pre-trained
Word2Vec
embeddings & predicts the Job-Category (Business / Sales-Marketing / Technical / Other).
python emailjobcategorizer.py