Skip to main content

Asynchronous python lib for Libgen.rs

Project description

Asynchronous python library for Libgen.rs to search and download books.

Installing libgenesis using the command line pip install libgenesis

    Importing libgenesis
    from libgenesis import Libgen

    Creating libgenesis object
    lg = Libgen()
    or
    lg = Libgen(sort= "year", sort_mode= "ASC", result_limit= 50)

    Searching for a book
    async def search():
        q = "japan history"
        result = await lg.search(q)
        for item in result:
            print("id = " + item)
            print("title = " + result[item]["title"])
            print("md5 = " + result[item]["md5"])


   Downloading for a book

   async def download():

       q = "japan history"

       result = await lg.search(q)

       download_location = []

       for item in result:

           file_path = await lg.download(result[item]["mirrors"]["main"])

           # path = Path("Downloads")

           # file_path = await lg.download(result[item]["mirrors"]["main"]], dest_folder=path)

           download_location.append(file_path)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

libgenesis-0.1.0.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

libgenesis-0.1.0-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page