Skip to content

Instantly share code, notes, and snippets.

@hnabbasi
Created August 12, 2020 23:33
Show Gist options
  • Save hnabbasi/27afdd3ba9ee407586decb528fee0231 to your computer and use it in GitHub Desktop.
Save hnabbasi/27afdd3ba9ee407586decb528fee0231 to your computer and use it in GitHub Desktop.
# This script helps with ChaiOne timesheets in Mavenlink
# using Google sign in
#
# Params:
# email address
# password (base64 encoded)
#
# Usage:
# #\>python3 timesheethelper.py email@address.com base64Password
#
# Created by: Hussain N. Abbasi
# Version: v0.0.1 (Aug 7 2020)
import sys
from webbot import Browser
import time
import base64
print('Running ', sys.argv[0])
email = sys.argv[1]
password = base64.standard_b64decode(sys.argv[2]).decode('utf-8')
web = Browser()
link = web.go_to('https://chaione.mavenlink.com/login/google?from=mavenlink')
web.type(email,tag='input',id='login_email_address')
web.press(web.Key.ENTER)
time.sleep(1)
web.type(password, tag='input', id='login_password')
web.press(web.Key.ENTER)
time.sleep(3)
web.go_to('https://chaione.mavenlink.com/timesheets')
time.sleep(1)
web.click(tag='a', classname='fill-in-from-previous-week-link', loose_match=True)
print('Done running', sys.argv[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment