Skip to main content

pylectormanga es una biblioteca que te permite buscar manga disponible a través de https://lectormanga.com/. Y podrás acceder a su información.

Project description

pylectormanga

pylectormanga es una biblioteca que te permite buscar manga disponible a través de lectormanga. Y podrás acceder a su información.

Instalación

pip install pylectormanga

Uso

La biblioteca contiene la función search para buscar manga disponible y el objeto PyLectorManga, que tiene el parámetro url que se pasará para acceder a la información completa del manga.

A continuación te muestro cómo funciona:

from pylectormanga import search
from pylectormanga import PyLectorManga

title   = str(input("Introduce el nombre del manga: "))
results = search(title)

if results == []:
    print("No encontramos resultados.")
else:
    print("\nEncontramos resultados: ")
    for i, result in enumerate(results):
        print(f"{i+1}. {result['title']} - {result['type']}")
    
    index = int(input("\nIngresa un numero del manga al que deseas acceder: "))
    information_manga = PyLectorManga(results[index - 1]['url'])

    print('\n1. Información sobre el manga.')
    print('2. Obtener todos los capítulos del manga.')
    print('3. Obtener un capítulo específico.')

    value = int(input("\nIntroduce un valor en el que quieras al acceder al menú: "))

    match(value):
        case 1:
            manga = information_manga.get_manga_information()

            print(f"\nTítulo: {manga['title']}")
            print(f"Descripción: {manga['description']}")
            print(f"Géneros: {manga['genre']}\n")
        case 2:
            for chapter in information_manga.get_all_the_chapters():
                print(f"\nTítulo: {chapter['title']}")
                print(f"Fecha: {chapter['date']}")
                print(f"Ver manga: {chapter['url']}")
        case 3:
            chapter = str(input("Por favor ingresa el capítulo donde deseas obtener tu información. (Ejemplo 120.00): "))
            manga = information_manga.get_one_chapter(chapter)

            if not manga:
                print("\nNo encontramos resultados.")
            else:
                print(f"\nTítulo: {manga['title']}")
                print(f"Fecha: {manga['date']}")
                print(f"Ver manga: {manga['url']}")

Motivo

Todo surgió cuando estaba viendo mi anime favorito Tokyo Revengers.

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

PyLectorManga-0.0.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

PyLectorManga-0.0.1-py3-none-any.whl (5.1 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