Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kijijiapi: exception "urllib.error.HTTPError: HTTP Error 401: Unauthorized" #2

Open
ghost opened this issue Jun 20, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 20, 2016

Hi,

I tried kijijiapi on Arch Linux / Python 3.5.1:

./kijijiapi.py list

But I got this error:

[ ] Connecting to Kijiji...
[ ] Signing in... Traceback (most recent call last):
  File "./kijijiapi.py", line 402, in <module>
    main()
  File "./kijijiapi.py", line 339, in main
    args.func(args)
  File "./kijijiapi.py", line 359, in main_list
    main_signin(kijapi)
  File "./kijijiapi.py", line 349, in main_signin
    kijapi.sign_in()
  File "./kijijiapi.py", line 178, in sign_in
    f = urllib.request.urlopen(url, params)
  File "/usr/lib/python3.5/urllib/request.py", line 162, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 471, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 581, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 509, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 589, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized

Any idea why this exception is raised?
Kijiji may have changed the way people login?

Thank you.

Asher256

@adrienverge
Copy link
Owner

Hi @Asher256, sorry but I don't use Kijiji anymore so I can't help you there. As you point out, this is probably due to a change in the login form. If you find a fix, contributions are welcome! :)

@ArthurG
Copy link

ArthurG commented Oct 12, 2016

@Asher256 @adrienverge I am creating my own version of KijijiAPI. Kijiji has gotten a lot more complicated this bot was introduced, as a lot more information must be sent when you want to post an ad.

My new bot supports these features, tho. I invite developers to take a look and issues as they see fit. It's still in alpha mode and I'll be developing it in the coming months :)
https://github.com/guoarthur/KijijiBotV2

Thanks

@adrienverge
Copy link
Owner

Thanks @GuoArthur, I've added a link to your new tool on my project's README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants