From 2054cf3ca331ccfce6bb09d6868262fc39c0f4d9 Mon Sep 17 00:00:00 2001 From: Dainius Date: Thu, 4 May 2017 17:16:26 +0300 Subject: [PATCH] fix import --- fbchat/client.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fbchat/client.py b/fbchat/client.py index 3bc0619..d132b33 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -24,6 +24,13 @@ from .models import * from .stickers import * import time import sys + +# Python 3 does not have raw_input, whereas Python 2 has and it's more secure +try: + in put = raw_input +except NameError: + pass + # URLs LoginURL ="https://m.facebook.com/login.php?login_attempt=1" SearchURL ="https://www.facebook.com/ajax/typeahead/search.php" @@ -248,12 +255,6 @@ class Client(object): soup = bs(r.text, "lxml") data = dict() - # Python 3 does not have raw_input, whereas Python 2 has and it's more secure - try: - input = raw_input - except NameError: - pass - s = input('Please enter your 2FA code --> ') data['approvals_code'] = s data['fb_dtsg'] = soup.find("input", {'name':'fb_dtsg'})['value']