Added 2FA Support
Added new function _2FA. Specified that two things that are definitely shown when 2FA is enabled
This commit is contained in:
@@ -231,11 +231,11 @@ class Client(object):
|
|||||||
r = self._cleanPost(LoginURL, data)
|
r = self._cleanPost(LoginURL, data)
|
||||||
|
|
||||||
# Usually, 'Checkpoint' will refer to 2FA
|
# Usually, 'Checkpoint' will refer to 2FA
|
||||||
if 'checkpoint' in r.url:
|
if 'checkpoint' in r.url and 'Enter Security Code to Continue' in r.text:
|
||||||
r = self._2FA(r)
|
r = self._2FA(r)
|
||||||
|
|
||||||
# Sometimes Facebook tries to show the user a "Save Device" dialog
|
# Sometimes Facebook tries to show the user a "Save Device" dialog
|
||||||
if 'save-device' in r.url and 'Enter Security Code to Continue' in r.text:
|
if 'save-device' in r.url:
|
||||||
r = self._cleanGet(SaveDeviceURL)
|
r = self._cleanGet(SaveDeviceURL)
|
||||||
|
|
||||||
if 'home' in r.url:
|
if 'home' in r.url:
|
||||||
|
Reference in New Issue
Block a user