From c634947139a492f9f5ba7c01290b2439c0d140ba Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 19 Jul 2015 12:36:01 +0200 Subject: [PATCH] fix login on tinder: need to find the fucking cookie in js --- modules/tinder/browser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/tinder/browser.py b/modules/tinder/browser.py index b80b2990..b0a31cab 100644 --- a/modules/tinder/browser.py +++ b/modules/tinder/browser.py @@ -44,6 +44,11 @@ class FacebookBrowser(DomainBrowser): form['email'] = username form['pass'] = password form['persistent'] = 1 + for script in page.doc.xpath('//script'): + m = re.search('"_js_datr","([^"]+)"', script.text or '') + if m: + self.session.cookies.set('_js_datr', m.group(1)) + form.submit(allow_redirects=False) if 'Location' not in self.response.headers: raise BrowserIncorrectPassword()