Kijiji-Repost-Headless: Could not log in using the SSID method

I have switched properly over to the new log in method with SSID and it has been working for a few months. Recently I started to get a failure again saying could not log in again

Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File ".\kijiji_repost_headless\__main__.py", line 193, in <module>
    main()
  File ".\kijiji_repost_headless\__main__.py", line 50, in main
    args.function(args)
  File ".\kijiji_repost_headless\__main__.py", line 140, in repost_ad
    delete_ad(args, api)
  File ".\kijiji_repost_headless\__main__.py", line 121, in delete_ad
    api.login(args.ssid)
  File ".\kijiji_repost_headless\kijiji_api.py", line 107, in login
    raise KijijiApiException("Could not log in.")
kijiji_api.KijijiApiException: Could not log in.```

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 22 (3 by maintainers)

Most upvoted comments

To fix the issues change URL https://www.kijiji.ca/my/ads.json to https://www.kijiji.ca/my/ads in kijiji_api.py. There are two instances of the old URL in that file.

I would agree, that would be a better solution however I don’t think we have access to that right? or is there a workaround that I am unaware of?

Kijiji uses an internal API on their mobile apps.

The kijiji-manager Python package uses Kijiji’s internal API to communicate with Kijiji’s backend. It runs a local web server where you manage your ads. Disclaimer: I am the author and maintainer of this project.

Just tested that project. Working well. I set it up as a service on a raspberry Pi

Could you specify how you set it up as a service on RPI

Hi @matrix303,

I am using a Raspberry Pi 3B I believe. I am running Ubuntu off of it. Hopefully this helps you and others.

I followed the project’s installation instructions. I created a folder off of my user directory, then git cloned the repo, then initialized and activated a virtual environment for it. After that, I downloaded the packages defined in the projects requirements.txt file.

I then made my service file (kijiji_manager.service) in /etc/systemd/systemd/ directory. Feel free to call you service file whatever you please.

Service File Example
[Unit]
Description=Kijiji-manager webserver
After=network.target

[Service]
WorkingDirectory=/home/ubuntu/scripts/new_kijijireposter/kijiji-manager
Environment="PATH=/home/ubuntu/scripts/new_kijijireposter/.venv/bin"
ExecStart=/home/ubuntu/scripts/new_kijijireposter/.venv/bin/python3 -m kijiji_manager -b 0.0.0.0
TimeoutSec=300

[Install]
WantedBy=multi-user.target

WorkingDirectory: the directory where the kijiji-manager project is Environment: Path to your virtual environment activation file I believe. In ubuntu, it is in <venv_dir_name>/bin/ ExecStart: This actually runs the package (in the working directory specified in the WorkingDirectory variable). Ensure you run it with the -b 0.0.0.0 argument. This will allow you to access the project from another system other than localhost which is the default.

After the service file has been created, see the following commands below:

To launch the service: sudo systemctl start kijiji_manager.service To check on the status of the service: sudo systemctl status kijiji_manager.service To enable the service to automatically start if your system unintentionally loses power sudo systemctl enable kijiji_manager.service. If you do not do this you will have to manually start the service every time it goes down (intentional or not).

If you need to review logs of your service use: sudo journalctl -u kijiji_manager.service

Obviously, replace kijiji_manager.service with whatever you call your service file on your system.