Skip to main content

A python package for login google by selenium

Project description

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.

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 = login(email, password, backup_email)
driver = profile.retrieve_driver()
profile.start()
# Do whatever with driver afterward
driver.get('https://www.google.com/')
...

Add folder extension/ if you want custom extensions for Chrome (.crx or .zip). Your folder should look like this

/temp
    /profiles
      /profile1
      /profile2
/extension
    extension1.zip
    extension2.crx
example.py

Upload to pypi

  1. Organize your code into proper file hierarchy
  2. Add a LICENSE and a README.md if not already done
/demopackage
    __init__.py
    demopackage.py
    /demosubpackage
      __init__.py
      demosubpackage.py
    /tests
        test_package.py
LICENSE
setup.py
  1. Create your setup.py
import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="login_gmail_selenium",
    version="0.0.1",
    author="Minh Hoang",
    author_email="nguyenthanhdungktm@gmail.com",
    description="A python package for login google by selenium",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/ngminhhoang1412/LoginGmailSelenium",
    packages=setuptools.find_packages(),
    classifiers=(
        "Programming Language :: Python :: 3.9",
        "Operating System :: OS Independent",
        "License :: OSI Approved :: MIT License"
    ),
)
  1. Create distribution archive files

Before you begin, run the following command to update required packages:

pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel

This should create a dist/ folder in your main directory with the compressed files for your package! 5. Upload your distribution archives to PyPI

pip install --upgrade twine
twine upload dist/*

You will be prompted for your PyPI login credentials, and then the upload will begin. Now you should be able to log in to your PyPI account and see your package.

License

Copyright © 2022 MoliGroup, MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

login_gmail_selenium-0.0.6.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

login_gmail_selenium-0.0.6-py3-none-any.whl (46.1 kB view details)

Uploaded Python 3

File details

Details for the file login_gmail_selenium-0.0.6.tar.gz.

File metadata

  • Download URL: login_gmail_selenium-0.0.6.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.0

File hashes

Hashes for login_gmail_selenium-0.0.6.tar.gz
Algorithm Hash digest
SHA256 63fed3e57ce2a6403e1d1368cf8a7b66f0575e64f30ffc37622336e8d0834682
MD5 9a02a3c726df09134b2e6c8b853267f2
BLAKE2b-256 a41965a10cdf5be8220c44ab20180d1208a1033d5fe40714dfb08046e3b37a68

See more details on using hashes here.

File details

Details for the file login_gmail_selenium-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for login_gmail_selenium-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 24d3e12afbd481a78085bc3180ea5a309076fb02964a06027d3984a3dbf1bbc3
MD5 847aec6f0b9454b5abc39b74b80b0b3f
BLAKE2b-256 a1095faceb253fbf2ffb5f0db382bf580b40defe8539569fdd18b5f33153daac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page