App for viewing, posting, reposting, and deleting your Kijiji ads
Project description
Kijiji Manager
Kijiji Manager app for viewing, posting, reposting, and deleting your Kijiji ads.
Built using the Flask framework with Python 3.6+. Completely API driven, with no web scraping. Runs a local webserver which provides the web user interface.
Kijiji Manager is able to handle all types of ads under every Kijiji category (although not every ad type has been extensively tested).
If you find any bugs with posting ads, please create a new issue to report it.
Requirements
Kijiji Manager requires Python 3.6+.
Minimum dependencies
Flask
Flask-WTF
Flask-Login
Flask-Executor
WTForms
httpx
xmltodict
is-safe-url
phonenumbers
Installation
- Install from source
- Clone this repository
git clone https://github.com/jackm/kijiji-manager.git cd kijiji-manager
- Create a new virtualenv (optional but highly recommended)
python3 -m venv venv source venv/bin/activate
- When using a virtualenv, you must source the
venv/bin/activate
script each time you start a new shell, otherwise the installed Python packages will not be available - If using a Debian based Linux distro, and the venv Python library is not found or if there is an error about missing ensurepip, you will have to apt install
python3-venv
first - If using Windows, you may have to use the
py
command in place ofpython
orpython3
- If using Windows, the activate script will be at
venv/Scripts/Activate
instead - See the Python virtual environments tutorial for more information
- When using a virtualenv, you must source the
- Install the kijiji-manager package from the current directory
pip install .
- Clone this repository
- Copy the sample config file at
kijiji_manager/kijiji-manager-sample.cfg
and rename it tokijiji-manager.cfg
, putting it in the instance folder- Create a folder named
instance
at the root of this repository if it does not exist
- Create a folder named
- Edit the secret key variable on the first line in
instance/kijiji-manager.cfg
to a random value- To generate a random value you can run the following and copy the output:
python -c "import secrets; print(secrets.token_urlsafe(16))"
- To generate a random value you can run the following and copy the output:
- Run the app from a shell/terminal:
python -m kijiji_manager
orkijiji-manager -c instance/kijiji-manager.cfg
- Append
--help
to see all possible command line arguments
- Append
- Open a browser and go to http://localhost:5000/ or http://127.0.0.1:5000/
- Cookies must be enabled in order to log in
- Login using an existing Kijiji account
- You must register for a new account on kijiji.ca if you do not yet have one
For all subsequent runs, start the app again using python -m kijiji_manager
or kijiji-manager -c instance/kijiji-manager.cfg
and then go to the web interface in your browser.
You can also leave the app running in the terminal if you wish.
No background HTTP calls are made unless you refresh or load new pages.
Command line arguments
usage: kijiji-manager [-h] [-c CONFIG] [-b BIND] [-p PORT] [-d]
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
path to config file
-b BIND, --bind BIND interface to bind to (default: localhost)
-p PORT, --port PORT port to bind to (default: 5000)
-d, --debug enable debugging
Docker container
A Dockerfile is provided as well as a docker-compose.yml file to allow running this app within a Docker container. At minimum this method will require Docker to be installed.
Using this method does not require installing any Python packages locally - the whole app will be installed and run within an isolated container.
You should still create a instance/kijiji-manager.cfg
file containing a randomly generated secret key within the instance folder (steps 2 and 3 of Installation).
By default, the web interface will still be reachable at http://localhost:5000/ or http://127.0.0.1:5000/.
If you want to provide a custom config file path other than instance/kijiji-manager.cfg
, this can be done by setting the CONFIG_FILE
environment variable when running the container.
Docker Compose
Docker Compose is an additional tool that can be used to easily deploy app containers. In this case, Docker Compose is used to automatically build and run the app container.
Run docker-compose up
from the root of this repository.
If changes are made to the kijiji_manager package, you will have to run docker-compose up --build
instead to force rebuild the container image.
Without Docker Compose
If you do not want to use Docker Compose, you can build the container image and then run the container using the following commands from the root of this repository:
docker build -t kijiji-manager .
docker run --rm --name kijiji-manager -p 5000:80 -v "$(pwd)"/instance:/app/instance kijiji-manager
Append the --detach
option to the docker run
command to run the container in the background (detached mode).
Screenshots
Credits
Many of the core architecture concepts have been borrowed from the Kijiji-Reposter project. Many thanks to rybodiddly for the work they have done, especially on the Kijiji API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kijiji-manager-0.1.5.tar.gz
.
File metadata
- Download URL: kijiji-manager-0.1.5.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44811389aa170b38be9721fd4554040045335c3b96e0269338011d92c63009ad |
|
MD5 | 1cf6f161b104f78288ac0829896f90a1 |
|
BLAKE2b-256 | 8a271ee25ffbda8d32989de7103bd8f62084b30f966f7e9beed74c3fa8329154 |
File details
Details for the file kijiji_manager-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: kijiji_manager-0.1.5-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a35b62c532411f5812ab4a436e9c5b114b63a3988a811c3add13eefbc5705948 |
|
MD5 | 168360c33fd3d617ca6e3f91a0cfd24c |
|
BLAKE2b-256 | 54961d1ec8882f78cd72b01492aa7b41dc5be6ddb5ab018a05a03bd9bac98f07 |