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

KijijiApiException: Could not log in #229

Open
amrit-moomie opened this issue Apr 27, 2024 · 5 comments
Open

KijijiApiException: Could not log in #229

amrit-moomie opened this issue Apr 27, 2024 · 5 comments

Comments

@amrit-moomie
Copy link

amrit-moomie commented Apr 27, 2024

I have been using this library and suddenly started getting below error when calling repost_all

Traceback (most recent call last):
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Kijiji-Repost-Headless/kijiji_repost_headless/__main__.py", line 208, in <module>
    main()
  File "/Users/amrit/Workspace/Kijiji-Repost-Headless/kijiji_repost_headless/__main__.py", line 55, in main
    args.function(args)
  File "/Kijiji-Repost-Headless/kijiji_repost_headless/__main__.py", line 63, in repost_all
    api.login(args.username, args.password)
  File "/Kijiji-Repost-Headless/kijiji_repost_headless/kijiji_api.py", line 67, in login
    raise KijijiApiException("Could not log in.")
kijiji_api.KijijiApiException: Could not log in.
@IH3lios
Copy link

IH3lios commented May 2, 2024

Broken for me as well. Same message as mentioned by @amrit-moomie

@amrit-moomie
Copy link
Author

amrit-moomie commented May 2, 2024

I suspect its because the api url (https://mingle.kijiji.ca/api) is moved.

This is the login api response


<!DOCTYPE html><html><head><title>Error Page</title><style type="text/css">html{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:1em}.center-box{margin: 20% auto auto auto;width: 50%;border: 1px solid #dcdcdc;padding: 1em;}
</style><title>Security Violation (502)</title></head></head><body>
<div class="center-box">
    <h3>mingle.kijiji.ca&nbsp;|&nbsp;Bad Gateway (502)</h3>
    <h4>Backend Server Error.</h2>
    <p>The server you are looking for is currently not available.</p>
    <p>Ref: <span id="addr">142.115.26.43</span>&nbsp;<span id="time">1714622507</span></p>
</div></body><script>document.getElementById("time").innerHTML = (new Date()).toISOString()</script>
</html>

@ArthurG Is there a way to find out the new URL

FYI: mwpenny/kijiji-scraper#73

@Rings4
Copy link

Rings4 commented Sep 20, 2024

I'm having the same issue. It requires a new kind of token which changes often making it only good for 1 or 2 ad posts, at best.

@amrit-moomie
Copy link
Author

Can you explain how did you get 1 or 1 posts working.

I can try to reproduce further and see if its fixable

@Rings4
Copy link

Rings4 commented Sep 23, 2024

Can you explain how did you get 1 or 1 posts working.

I can try to reproduce further and see if its fixable

Sure, please see this comment: #228 (comment)

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

3 participants