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 call
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('www.google.com')
Add folder extension/ if you want custom extensions for Chrome (.crx or .zip)
Upload to pypi
- Organize your code into proper file hierarchy
- 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
- 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"
),
)
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for login_gmail_selenium-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b48841f77419004cbe59d5f10a8aaea58dc4a7aaa566e8e2ffd580ef9fbb6633 |
|
MD5 | df87701e65f55cbde2d4876ef5351e33 |
|
BLAKE2b-256 | 4582d19d1531a948e5a9a97764b8bb418e3032ea3238182f90713a4a4eef14ab |
Hashes for login_gmail_selenium-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba20b0de0ae8d06aaedd0fb08aae931f7d32a6290d846add28a7086be437279 |
|
MD5 | 43a2bcafb25f8b2316f98a31960174ba |
|
BLAKE2b-256 | 943759553595425d5ad4fb9b043d60f53fb6d4f2a33153c462e1afb30b081a34 |