Skip to main content

Author:KuoYuan Li

auto login google account by selenium chrome driver

installation Note

Need selenium 4(or newer) and webdriver_manager to get the chromedriver automatically. if the version dose not matcch , please uninstall the selenium and install again.

bardapi is used in sample code and should be installed to insure it work normaly

pip install bardapi
Sample code
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
from bardapi import Bard
import seleniumGoogleLogin
import bardToken
email = 'your gmail'
password = 'your password'
#start chromedriver
driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
#google auth
if seleniumGoogleLogin.start(driver,email, password):
    #get bard token
    token = bardToken.get(driver)
    print(token)
    bard = Bard(token=token)
    ans = bard.get_answer("is there any bard api?")['content']
    print(ans)

License

MIT

Metadata

Release files for bardToken 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bardToken 0.0.3
File Size Uploaded
bardToken-0.0.3.tar.gz 3.1 kB Details

Release files / bardToken-0.0.3.tar.gz

Download URL bardToken-0.0.3.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
23e73bbd1c765a572d446f9d01821ca919b751ecc60bcbefbf8ba316cd242be0
BLAKE2b-256 checksum
How to use checksums
0078b779676ba708e51c15ece257a0e7855b3019c9c3f0c6b7da225a7723b202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page