Git Product home page Git Product logo

telegraphsearchbot's Introduction

Telegraph Search Bot

Many people use the Telegra.ph platform to write articles and guides In order to get a Instant View in Telegram apps. This bot will let you to give your users a great tool to search among the articles you have created in your telegra.ph account.

  • You can check out our bot here. (The bot and screenshots are in Hebrew but the strings in the source code are in English).

How to config?

  • Clone this repository:
git clone https://github.com/david-lev/TelegraphSearchBot.git
  • Install requirements (pyrogram, telegraph, tgcrypto):
pip3 install -r requirements.txt
  • edit and insert the folowing values into the config file:
[pyrogram]
api_id = 53**5287
api_hash = 1ed3*******0cc7a1ed***fcc77

bot_token = 1463783971:AAGuhvh****C-X**oxvHN**hhyo

[plugins]
root = bot

[telegraph]
access_token = e8200db697*****8c3791296f**0f77c4e5a***2e7e

[telegram]
bot_username = @YourBotUsername

Telegram keys:

  • the api_id & api_hash You can get from my.telegram.org.
  • bot_token & bot_username you can get by create new bot on BotFather.

Telegra.ph Token:

to get access_token for your telegra.ph account go to Telegraph Bot, chosse your account and log into the browser. in the addreess bar click on the lock icon > Cookies > edit.telegra.ph > Cookies > tph_token > Content. here is an example.

Strings

  • You can change the bot view by editing the Strings.py file. You can set an welcome message, channel credit, inline buttons and more. The default is in English but you can change if you want. dont delete the {} characters.
  • There is a string named char_ignore that sets to ignore any post whose title starts with the same character. This way you can hide or create new posts that do not appear in the general search (can be changed at any time.)

How to run?

go to project directory:

cd TelegraphSearchBot

and run it:

python3 main.py

telegraphsearchbot's People

Contributors

david-lev 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.