From cc473f018fa2d3d5dd1d32ae7ff2894c2792598b Mon Sep 17 00:00:00 2001 From: Anderson Bezerra Date: Tue, 17 Sep 2019 11:01:27 -0300 Subject: [PATCH 1/2] Change find csrf parse.find() was looking for an id no longer available --- LinkedInt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LinkedInt.py b/LinkedInt.py index ca2e327..4bd8ca5 100644 --- a/LinkedInt.py +++ b/LinkedInt.py @@ -52,7 +52,7 @@ def login(): page = loadPage(opener, "https://www.linkedin.com/") parse = BeautifulSoup(page, "html.parser") - csrf = parse.find(id="loginCsrfParam-login")['value'] + csrf = parse.find("input", {"name":"loginCsrfParam"})['value'] login_data = urllib.urlencode({'session_key': username, 'session_password': password, 'loginCsrfParam': csrf}) page = loadPage(opener,"https://www.linkedin.com/uas/login-submit", login_data) From 294d1db18642a74dc4df876f90f23915966f1c92 Mon Sep 17 00:00:00 2001 From: Anderson Bezerra Date: Tue, 17 Sep 2019 11:18:56 -0300 Subject: [PATCH 2/2] Add initial value for code If an exception ocurred, code variable remained empty and broke the script --- LinkedInt.py | 1 + 1 file changed, 1 insertion(+) diff --git a/LinkedInt.py b/LinkedInt.py index 4bd8ca5..2b796af 100644 --- a/LinkedInt.py +++ b/LinkedInt.py @@ -330,6 +330,7 @@ def validateEmail(domain,email): socket.setdefaulttimeout(10) server = smtplib.SMTP(timeout=10) server.set_debuglevel(0) + code = 0 try: print " [*] Checking for valid email: " + str(email) server.connect(mxhost['Host'])