GithubHelp home page GithubHelp logo

botluci / bookdlbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samfun75/bookdlbot

0.0 0.0 0.0 94 KB

A Telegram bot to search and download books from Libgen.rs using an asynchronous libgen api wrapper called libgenesis

License: MIT License

Python 100.00%

bookdlbot's Introduction

Bookdl Bot

This is a working example to integrate libgenesis (an api for Libgen.rs) with a telegram bot.

Requirments

Installation

Heroku

Use the below button to deploy.

Deploy

Other systems

Clone repository

git clone https://github.com/Samfun75/BookdlBot

Change to repository directory

cd BookdlBot

Install requirements and dependencies

pip3 install -r requirements.txt

Create a new config.ini using the sample available at bookdl/working_dir/config.ini.sample in bookdl/working_dir/.

# Here is a sample of config file and what it should include:

# More info on API_ID and API_HASH can be found here: https://docs.pyrogram.org/intro/setup#api-keys

[pyrogram]
api_id = 1234567
api_hash = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
app_version = 1.0
device_model = PC
system_version = Windows

# Where pyrogram plugins are located

[plugins]
root = bookdl/telegram/plugins


# More info on Bot API Key/token can be found here: https://core.telegram.org/bots#6-botfather

[bot-configuration]
bot_token = 123456789:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
session = BookdlBot
dustbin = -100xxxxxxxxx # Used to store uploaded book. id of a channel where the bot is admin
allowed_users = [123456789, 987654321] # Telegram id of users allowed to use the bot. If the bot is open to all put empty array like this []

# Mongodb Credentials

[database]
db_host = xxxxxxxxxx.xxxxx.mongodb.net or localhost # In this section db_host is the address of the machine where the MongoDB is running
db_username = username
db_password = password
db_name = BookdlBot
db_type = Mongo_Atlas (or Mongo_Community)

# ConvertAPI secret

[convert]
convert_api = secretkey

Run bot with

python -m bookdl

stop with CTRL+C

Usage

  • Send /start and press Search ๐Ÿ” and on the open inline query type the book name
  • Send a book's MD5 like 'MD5:a382109f7fdde3be5b2cb4f82d97443b'
  • Send a book link from 'library.lol, libgen.lc, libgen.gs or b-ok.cc'

After performing one of the above seteps a book detail with 'Download' button is returned and press the button to download and upload the book to telegram.

For books other that PDF, a ๐Ÿ”ƒ Convert to PDF button is included and it uses converapi to convert the ebook to pdf

bookdlbot's People

Contributors

dependabot[bot] avatar samfun75 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.