Giter VIP home page Giter VIP logo

olx-parser's Introduction

OLX flat parser.

Simple python script which can be running by crontab every 30 minutes for instance, looking up about new flats in Odessa and notifying in the telegram through the bot. The script is looking for apartments that were added yesterday and today only.

Prerequisites

  1. python 3.6 or higher
  2. pipenv
  3. sqlite3

Getting Started

  1. Clone project to your own local machine - git clone https://github.com/digitalashes/olx-parser.git
  2. Go to the script directory - cd olx-parser
  3. Copy file env.example to config directory and rename it to .env - cp env.example ./config/.env
  4. Fill in TELEGRAM_BOT_KEY and TELEGRAM_CHAT_IDS in config/.env also if you want, you can uncomment and change others constants.
  5. Create new pipenv environment - pipenv install
  6. Run pipenv shell main.py and waiting messages.

Settings description:

Crontab rule (every 30 minutes) - 0/30 * * * * <path to python interpritator> <path to file main.py>

  1. BASE_URL - Base url of olx with protocol. - https://www.olx.ua/
  2. PHONE_URL - Url for fetching seller telephone numbers.
  3. CATEGORY - nedvizhimost
  4. SUB_CATEGORY - arenda-kvartir
  5. SUB_SUB_CATEGORY - dolgosrochnaya-arenda-kvartir
  6. CITY - odessa
  7. DISTRICT_ID - 85 (Киевский), 199 (Коминтерновский), 87 (Малиновский), 89 (Приморский), 91 (Суворовский)
  8. MIN_PRICE - Min price of flat rent (not set less 1000). 2500
  9. MAX_PRICE - Max price of flat rent. 5000
  10. MIN_ROOMS - Min rooms amount in flat. 1
  11. MAX_ROOMS - Max rooms amount in flat. 1
  12. WITH_PHOTOS - Search ads with photos only or not. True
  13. WITH_PROMOTED - Include promoted ads. False
  14. PUBLICATION_DATE - List of values with information when ad was published. ['сегодня', 'вчера']
  15. TELEGRAM_BOT_API_URL - Telegram api url.
  16. TELEGRAM_BOT_KEY - Api key of telegram bot which will be sending messages.
  17. TELEGRAM_CHAT_IDS - List of conversations ids when messages will be sending.
  18. LOG_FILENAME - Name of logfile.

olx-parser's People

Contributors

dependabot[bot] avatar digitalashes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.