Version up, thanks to @orenyomtov and @Abhinav2812
Also fixed `Client.isLoggedIn`
This commit is contained in:
@@ -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'
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user