jkeesh / scpd-scraper

download and convert SCPD lectures easily
17 stars 17 forks source link

2 - Step Auth #11

Open sgfin opened 11 years ago

sgfin commented 11 years ago

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()
jkeesh commented 11 years ago

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