infoTelegramBot

by nrjshka

GitHub Readme.md

InfoTelegramBot

Telegram Bot, which sends out information from Vkontakte, Facebook, Twitter and Youtube.
The essence of the work lies in the work of the Flask-server and the independent Python-parser.

Deploy to heroku

To get started

To get started, you need to install the package specified in the *requirements.txt*
Also, you should install *NodeJS* and *PhantomJS* - the benefit of this is the manuals and I do not have to describe all this here.
To check up working capacity it is possible a command (in a project root):python3 index.py
The same goes for the work of the parser, just try to run it by going to the folder `/parser`: python3 index.py

Flask-server


When the server starts, Telegram Webhook is initialized. Also, it has a list of methods that process and issue certain data.

Methods

  1. /getsubs - Provides subscriptions in the form of serialized json data
  2. /setupdates - Accepts GET data from the parser and updates the state in the database + sends the posts to clients.

Parser

Runs every n seconds (the default value is 120).
Sends a POST request to the server; when you receive data - starts to run through the links.
Forms a json update list for each group - when new data is received, it sends to the server.
Now only Vkontakte support is added.