Giter Site home page Giter Site logo

kvartirkin's Introduction

KvartirkinBot (Parser)

Этот бот позволяет следить за квартирами на сайте thelocals.ru и отправлять изменения о них всем заинтересованным лицам прямо в телеграм-контакт бота.
Все запросы используют мобильное api сайта thelocals.ru

Приложение разделено на две части:
парсер и слушатель. Парсер это однопроходный скрипт который вызывается по расписанию раз в какое-то время, или же единоразово пользователем. Бот ведёт базу квартир, и при обнаружении изменений, информирует о них всех подписанных пользователей.

Полезная информация

Список известных точек входа на сайт locals:

URL: /api/frontend/... METHOD DESCRIPTION
/profile GET JSON with profile
/subways/select2 GET Count number of flats by underground stations
/rooms GET ALL flats get
/rooms/map GET Map coordinates of flats
/rooms/126514 GET Info about flat
/rooms/126514/contacts GET Subscription (get contacts)
/main_filter/result_url?city_id=1 GET ?????????????????????????????????????????????
/subways/select2?city_id=1 GET ?????????????????????????????????????????????
URL: /api/v1/... METHOD DESCRIPTION
/subways GET Underground dictionary

https://geocode-maps.yandex.ru/1.x/?geocode=37.59374,55.81156 - get name of the street, building, etc

filter example: 'filter[kind]=apartment&filter[rooms][]=1&filter[rooms][]=2&filter[rooms][]=3&filter[price_max]=50000'

https://thelocals.ru/treshka-na-dinamo https://thelocals.ru/treshka-na-dinamo-d6d52b02-0a6d-48d5-8301-ab46003f1581 // IF were already

https://thelocals.ru/horoshiy-dom-s-krasivym-divanom-i-kuhney // Way to get data, unfortunately

getFavoriteUrl: function() { return "/api/frontend/rooms/" + this.props.ad.id + "/favorite" }, getUnfavoriteUrl: function() { return "/api/frontend/rooms/" + this.props.ad.id + "/unfavorite" },

print(flats_pages[i-1]['ads'])

[thelocals] url_api = https://thelocals.ru/api pattern = ?filter[kind]=apartment&filter[rooms][]=1&filter[rooms][]=2&filter[rooms][]=3&filter[price_max]=50000&page=%%d https://thelocals.ru/api/frontend/rooms?filter[kind]=apartment&filter[rooms][]=1&filter[rooms][]=2&filter[rooms][]=3&filter[price_max]=50000&page=1

25 flats per request json

kvartirkin's People

Contributors

aleksmt avatar

Stargazers

Evgenii Burmentev avatar

Watchers

Evgenii Burmentev avatar  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.