Giter Site home page Giter Site logo

tgpars's Introduction

Парсер входящих сообщений [telethon + aiohttp]

Данное приложение парсит все новые входящие сообщения с чатов. Если в соообщении есть любое из указаных ключевых слов, то сообщение пересылается в группу. Если сообщение было отправлено в супергруппе, то к нему также добавляется ссылка на сообщение в данном чате.

Как настроить

Сперва нужно получить api id, api hash https://my.telegram.org/

Переименовать config_example.py в config.py

Настроить config.py

Как запустить

Выполните следующие команды в терминале

  1. Создайте виртуальную среду
  • $ python3 -m venv venv
  1. Активируйте её
  • $ source venv/bin/activate
  1. Установите все необходимые зависимости (один раз)
  • (venv) $ pip install -r requirements.txt
  1. Запуск
  • (venv) $ python main.py

При первом запуске необходимо будет выполнить авторизацию в ваш телеграм аккаунт После чего появится файл с сессией (имя сессии.session) После удачного запуска можно пользоваться докером

  • docker-compose up --build

Выставить ключевые слова

  • через веб перейдите по адресу 127.0.0.1:8001 (или) 0.0.0.0:8001 (там будет форма)
  • в тесктовом документе shared/keywords.txt (через запятую)

tgpars's People

Contributors

firezet avatar

Watchers

 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.