()
| 880 | |
| 881 | |
| 882 | def authenticate(): |
| 883 | try: |
| 884 | a = login() |
| 885 | print(a) |
| 886 | session = a |
| 887 | if len(session) == 0: |
| 888 | sys.exit("[!] Unable to login to LinkedIn.com") |
| 889 | print(("[*] Obtained new session: %s" % session)) |
| 890 | cookies = dict(li_at=session) |
| 891 | except Exception as e: |
| 892 | sys.exit("[!] Could not authenticate to LinkedIn. %s" % e) |
| 893 | return cookies |
| 894 | |
| 895 | |
| 896 | def loadPage(client, url, data=None): |