scpd-scraper
scpd-scraper copied to clipboard
2 - Step Auth
With the two-step auth, it may be necessary for some users (like me) to receive a text message with a passcode in order to authenticate. Adding the following lines immediately after the password entry part of the code has Stanford send a authorization text, and prompts the user to input the code sent therein, which it uses to finish authentification before sending.
# Open the course page for the title you're looking for
br.submit()
br.select_form(name="multifactor_send")
br.submit()
br.select_form(name="login")
br["otp"] = raw_input('Enter Code Received By Text: ')
response = br.submit()
I'm not actively testing the script, but if you can submit a pull request in a way that just adds a flag and keeps it working for other people I can merge it