Code Monkey home page Code Monkey logo

get-urls-via-imap's Introduction

get-URLs-via-IMAP

This sample python script will connect to an IMAP mailbox and collect all URL's from Unseen e-mails in the 'URLs' folder This is a docker container that uses a python script to connect to an IMAP mailbox and search for all URL's in the e-mail and click (requests.get) them.

Run the docker container

docker run -it -e IMAP_SERVER=<--IP-OR-HOST--> -e IMAP_USERNAME=<--USERNAME--> -e IMAP_PASSWORD=<--PASSWORD--> smck83/click-urls-via-imap

Other environment variables include DELAY which allows the frequency the script runs to be changed. Default is 30 seconds.

Sample output

connected sucessfully, scraping email
Found 4 unseen e-mails in IMAP folder \URLs:
Found 5 URLs in e-mail 1
Found 0 URLs in e-mail 2
Found 23 URLs in e-mail 3
Found 3 URLs in e-mail 4
{'1': {'https://protect-eu.mimecast.com/s/abcdefg123', 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd', 'https://eu-api.mimecast.com/branding/mime-sample/NOTIFICATION_LOGO_ID', 'https://static-uk.mimecast.com/mimecast/resources/images/notifications/powered-mimecast-logo-278x28.png', 'http://www.w3.org/1999/xhtml'}, '2': {}, '3': {'http://yahoo.com', 'https://www.news.com.au', 'https://google.com'}}

get-urls-via-imap's People

Contributors

smck83 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.