oukmzli / olx-telegram-bot

Telegram bot for tracking new apartment listings on OLX with customizable filters and instant notifications
0 stars 0 forks source link

OLX Telegram Bot

This bot monitors OLX for new apartment listings in Krakow and notifies users via Telegram. It now uses the OLX API for data retrieval and includes enhanced features for a better user experience.

Features

Commands

Setup

  1. Clone the repository:

    git clone https://github.com/oukmzli/olx-telegram-bot.git
    cd olx-telegram-bot
  2. Install dependencies:

    pip install -r requirements.txt
  3. Create a .env file and add your Telegram bot token:

    echo "TELEGRAM_BOT_TOKEN=your_bot_token_here" > .env
  4. Run the bot:

    python bot.py

Docker Deployment

  1. Build the Docker image:

    docker build -t olx-telegram-bot .
  2. Run the Docker container with database volume and environment variable:

    docker run -d \
    --name olx-bot \
    --env TELEGRAM_BOT_TOKEN=your_bot_token_here \
    -v /path/on/host/listings.db:/app/listings.db \
    olx-telegram-bot

    Replace /path/on/host/listings.db with the actual path on your host machine where you want to store the database.

    Ensure that when running the Docker container, you pass the TELEGRAM_BOT_TOKEN via the --env flag as per your instructions.

olx-telegram-bot/ ├── bot.py ├── db.py ├── olx_scraper.py ├── districts.py ├── requirements.txt ├── .gitignore ├── Dockerfile ├── .env (not included in version control) └── README.md