Compare commits

..

5 Commits

Author SHA1 Message Date
Mads Marquart
b8fdcda2fb Properly uploading requirements (pip requires changed version number) 2017-09-30 01:15:41 +02:00
Mads Marquart
0dac7b7b81 Version up, thanks to @ekohilas 2017-09-27 21:20:20 +02:00
Mads Marquart
b750e753d6 Merge pull request #206 from ekohilas/master
Fixes 2FA bug and updates pip requirements
2017-09-27 21:19:14 +02:00
ekohilas
ee33e92bed added conditional enum34 2.7 requirement 2017-09-27 19:24:35 +10:00
ekohilas
7413a643f6 fixed 2FA bug 2017-09-27 19:23:58 +10:00
3 changed files with 6 additions and 5 deletions

View File

@@ -17,7 +17,7 @@ from .client import *
__copyright__ = 'Copyright 2015 - {} by Taehoon Kim'.format(datetime.now().year)
__version__ = '1.0.20'
__version__ = '1.0.22'
__license__ = 'BSD'
__author__ = 'Taehoon Kim; Moreels Pieter-Jan; Mads Marquart'
__email__ = 'carpedm20@gmail.com'

View File

@@ -249,8 +249,9 @@ class Client(object):
r = self._cleanPost(self.req_url.LOGIN, data)
# Usually, 'Checkpoint' will refer to 2FA
if ('checkpoint' in r.url and
('Enter Security Code to Continue' in r.text or 'Enter Login Code to Continue' in r.text)):
if ('checkpoint' in r.url
and ('enter security code to continue' in r.text.lower()
or 'enter login code to continue' in r.text.lower())):
r = self._2FA(r)
# Sometimes Facebook tries to show the user a "Save Device" dialog
@@ -1541,7 +1542,7 @@ class Client(object):
def on2FACode(self):
"""Called when a 2FA code is needed to progress"""
input('Please enter your 2FA code --> ')
return input('Please enter your 2FA code --> ')
def onLoggedIn(self, email=None):
"""

View File

@@ -1,4 +1,4 @@
requests
lxml
beautifulsoup4
enum34
enum34; python_version == '2.7'