Date: Time:
Welcome, Log in by clicking  Here!

Parsing with python

Downloading your data from google takes DAYS

If you’re anything like me, your Gmail account tends to accumulate a lot of emails over time. While you can resort to exporting your data to free up some space, this process can be quite time-consuming, often stretching over hours or even days. However, with the advancements of 2023, you don’t need to possess advanced technical skills to efficiently retrieve the emails that matter most to you, saving them before embarking on a deleting spree!

  • I’m going to take the lazy route and see what chatGPT has to say…
  • The first few steps already presented a problem. The dev console doesn’t give you an option to download a JSON file so we’ll be taking another approach. 

 

Step 1: Creating YAML File for Gmail Credentials:

  • Create a YAML file named credentials.yml in the same directory as your Python script.
  • Inside the YAML file, store your Gmail username and password.

Step 2: Installing Required Libraries:

  • Open your terminal or command prompt.
  • Run the following command to install the necessary libraries:

Step 3: Writing the Script

  • Create a new Python file, e.g., gmail_extractor.py.
  • Import the necessary libraries and read Gmail credentials from the credentials.yml file:

Step 4: Connect to your Gmail inbox using IMAP and search for emails using specific criteria (e.g., sender's email):

Step 5: Iterate through the emails, extract relevant details, and write them to a text file:

And you're done! Execute and save e-mails from the people you care about in minutes!

Posted on August 18, 2023 in coding by henryoviedo93
Tags: ,

Comments on 'Parsing with python' (0)

Comments are closed.