Version up, thanks to @orenyomtov and @Abhinav2812

Also fixed `Client.isLoggedIn`
This commit is contained in:
Mads Marquart
2018-05-18 17:35:03 +02:00
parent ffa26c20b5
commit 38f66147cb
4 changed files with 7 additions and 4 deletions

View File

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

View File

@@ -217,7 +217,7 @@ class Client(object):
else:
self.fb_dtsg = re.search(r'name="fb_dtsg" value="(.*?)"', r.text).group(1)
fb_h_element = soup.find("input", {'name':'h'})
if fb_h_element:
self.fb_h = fb_h_element['value']
@@ -337,7 +337,7 @@ class Client(object):
"""
# Send a request to the login url, to see if we're directed to the home page
r = self._cleanGet(self.req_url.LOGIN, allow_redirects=False)
return 'home' in r.headers['Location']
return 'Location' in r.headers and 'home' in r.headers['Location']
def getSession(self):
"""Retrieves session cookies