Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/david-lev/telegraphsearchbot
📃 Search for articles in a telegra.ph account
https://github.com/david-lev/telegraphsearchbot
pycharm search-engine telegram telegram-bot telegraph
Last synced: 2 months ago
JSON representation
📃 Search for articles in a telegra.ph account
- Host: GitHub
- URL: https://github.com/david-lev/telegraphsearchbot
- Owner: david-lev
- License: mit
- Created: 2021-02-24T01:38:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-02T09:56:39.000Z (over 3 years ago)
- Last Synced: 2024-08-04T09:06:44.695Z (5 months ago)
- Topics: pycharm, search-engine, telegram, telegram-bot, telegraph
- Language: Python
- Homepage: https://T.me/AndrotipsSearchBot
- Size: 48.8 KB
- Stars: 14
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegraph Search Bot
Many people use the [Telegra.ph](https://telegra.ph/) platform to write articles and guides In order to get a [Instant View](https://instantview.telegram.org/) 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](https://t.me/AndrotipsSearchBot). (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](/bot/config.ini) file:
```
[pyrogram]
api_id = 53**5287
api_hash = 1ed3*******0cc7a1ed***fcc77bot_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](https://my.telegram.org).
- ``bot_token`` & ``bot_username`` you can get by create new bot on [BotFather](https://t.me/BotFather).
#### Telegra.ph Token:
to get ``access_token`` for your telegra.ph account go to [Telegraph Bot](https://t.me/telegraph), 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](https://telegra.ph/file/18ded40043d1f7a6a5a80.png) is an example.### Strings
- You can change the bot view by editing the [Strings.py](bot/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](bot/strings.py#L13) 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
```
---
![]()