Automatic System to login to the DOE portal and then fill out the daily health screening form. Option to run the code locally or be hip and cool and use AWS Lambda to fully automate this. Using aws you can fill it out once and never do it again
- Clone the repo
git clone https://github.com/ex4722/Auto_screen.git
- Move into that directory
cd Auto_screen
- Install requirements
pip install -r requirements.txt
- Create a .env file with your credentials
FirstName = "foobar"
LastName = "baz"
OSIS = "000000000"
username = "foobarbaz0"
password = "Password123"
- Run the script
- ?????
- Profit
-
Create an aws account, the free tier will work for this
-
Download the upload.zip file only
-
On the aws page create a new function at
https://console.aws.amazon.com/lambda/home?region=us-east-1#/create/function
-
Select the normal code package, select python3.9 from the drop-down menu, and then create the function
-
Select Upload From > .zip and select the file named upload.zip
-
Add in FirstName, LastName, OSIS, password and username (Casing matters here)
-
On the home dashboard select Add Trigger and search for CloudWatch Events
-
Create a new rule, name it anything, Schedule Expression for Rule type, and Set Schedule Expression to
cron(0 10 * * ? *)
. The 10 in this equation means 10AM in UTC time which is 6AM in GMT-4. Change this number to suit your needs
- Fun and Profit
Check out the how-it-works page to see an in-depth explanation
tl;dr : Hits the login page from the portal to get cookies, logins with cookies to get OAuth keys to the kingdom, redeems those keys at an endpoint to get login cookies, uses login cookies to submit the form as the user
- Add a function to screenshot the success message so users can SMS the image to themselves
- Clean up the code with functions and more comments