spinlud / py-linkedin-jobs-scraper

MIT License
311 stars 86 forks source link

Authentication Issues #29

Closed aymagee92 closed 2 years ago

aymagee92 commented 2 years ago

Thank you for putting this together. I've used it on and off for the last year and it's great.

I am trying to do an authenticated session. I've successfully pulled the cookie value, but it still runs it as an anonymous session. What is meant by the "python your_app.py" that is listed after the cookie value?

spinlud commented 2 years ago

If you are launching your script from terminal like:

python myscript.py

you can set environment variables in one line like:

LI_AT_COOKIE="ABCD1234" python myscript.py
aymagee92 commented 2 years ago

If I copy and paste the "ABCD1234" to the LI_AT_COOKIE= variable and run it from Visual Studio Code, should that run it as an authenticated session? When I do that, it's currently still running as anonymous.

aymagee92 commented 2 years ago

I was able to get it to an authentication session by placing the LI_AT_COOKIE and the value in the operating system's environmental variables. You will also have to close our and re-open your code editor for it to work.

https://imgur.com/JbEFzcG.png

spinlud commented 2 years ago

Yes you can also define env variables in that way on windows 👍

aymagee92 commented 2 years ago

What?

Sent from my iPhone

On Jun 16, 2022, at 11:23 AM, spinlud @.***> wrote:

 Yes you can also define env variables in that way on windows 👍

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.