tomquirk / linkedin-api

👨‍💼Linkedin API for Python
MIT License
1.68k stars 395 forks source link

advice to avoid CHALLENGE #392

Open Eitol opened 1 month ago

Eitol commented 1 month ago

To prevent the challenge from being sent to me, I used Firefox cookies:

cookiejar_simple = browser_cookie3.firefox(domain_name='.linkedin.com')
cookiejar = requests.cookies.RequestsCookieJar()
for cookie in cookiejar_simple:
    cookiejar.set_cookie(cookie)        
api = Linkedin('', '', cookies=cookiejar)

I leave it to you as advice because it has helped me.

selllikesybok commented 3 weeks ago

Worked for me, thanks!

Important context for anyone else who may not realize: Chrome and possibly all Chromium browsers currently implement a difficult-to-circumvent (at least on Windows) lock on the cookies file. Firefox does not. You can go down a whole set of rabbit holes trying to figure that out, or just use a non-Chromium browser.