Is get_profile not working?
Dr4k3z opened this issue · comments
This morning the function get_profile
threw the following error:
"requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
Last night the code was working correctly. Is there something i'm doing wrong?
Same happened to me, maybe linkedin changed something
Update: I checked the error I am getting and I am getting:
<Response [999]>
Request denied
Which means the following:
It seems that LinkedIn blocks "bad" request with this 999 non-standard Status Code (they should better respond with 400 Bad Request and an explanation). Some reports that it comes from the HEAD method (which is similar to GET but does not request the body), or a missing header( Accept-Encoding), or the User-Agent header, or the source IP (from Heroku).
Update: I checked the error I am getting and I am getting: <Response [999]> Request denied
Which means the following: It seems that LinkedIn blocks "bad" request with this 999 non-standard Status Code (they should better respond with 400 Bad Request and an explanation). Some reports that it comes from the HEAD method (which is similar to GET but does not request the body), or a missing header( Accept-Encoding), or the User-Agent header, or the source IP (from Heroku).
If the response 999 is displayed, the cookie is invalid. You can delete the file of the cookie
@Hakurei-git
Can you please tell me how can I clear the cookies and where is the location
@Hakurei-git Can you please tell me how can I clear the cookies and where is the location
In the linkedin_api directory there is a setting.py file where you can print the COOKIE_PATH and change it to where you want it to be
It worked for me, just cleaned the cookies and it worked, thanks!