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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for libgenesis-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f3604e509caad9ce7f8ea26843cd659e13992a4efa5ee116d3fcaa4912eff0 |
|
MD5 | bca742a15c583756afd84d80a4a93433 |
|
BLAKE2b-256 | 7d7b8ffa9b16661d8d6240d40dc83cf829ae0ddc7b6d4a75f69166b6f1134950 |