Code Monkey home page Code Monkey logo

logingmailselenium's Introduction

Google login with Selenium

Overview

This is a small package to log in to Google account with Selenium. After signin, Chrome profile of that user will be create and stored. With Chrome profile you can do so many automatic things with it.

Always active extension is installed by default. To store the profile with minimum size on disk, WorkerService cache, OptimizationGuide and cache is cleared when quitting driver.

This has been developed for testing purposes only. Any action you take using this script is strictly at your own risk. I will not be liable for any losses or damages you face using this script.

Requirement

Must have Python <= 3.9 and Google Chrome installed.

Usage

pip install login_gmail_selenium

And then on example.py

from login_gmail_selenium.util.profile import ChromeProfile

profile = ChromeProfile(email, password, backup_email)
# To allow downloads add insecure=True to ChromeProfile
# To handle false email with custom functions, use param false_email_callback
driver = profile.retrieve_driver()
profile.start()
# Do whatever with driver afterward
driver.get('https://www.google.com/')
driver.quit()
...
  1. Add folder extension/ if you want custom extensions for Chrome (.crx or .zip)
  2. The temp folder's content will be generated by the library. Your folder should look like this
/temp
    /profiles
        /profile1
        /profile2
/extension
    /custom_extension
        extension1.zip
        extension2.crx
example.py

License

Copyright © 2022 MoliGroup, MIT license. For an improvement or a bug please feel free to open a PR

For work information please contact [email protected] or LinkedIn.

logingmailselenium's People

Contributors

hoangmoli avatar nguyenthanhdg avatar dungmoli avatar ngminhhoang1412 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.