Skip to main content

A Python package for fetching Mizo song lyrics from Zohlathu.in

Project description

A Python package for fetching Mizo song lyrics from www.zohlathu.in

Installation

You can install the package using pip:

pip3 install zohlathu

Usage

from zohlathu import get_lyrics


song_name = "C. Sanga - Tawnmang Lasi"  # Replace with the name of the song you are requested
lyrics = get_lyrics(song_name) # Get the lyrics
if lyrics:
    # Format the response
    response = (
        f"{lyrics['title']}\n\n"
        f"{lyrics['lyrics']}\n\n"
        f"Source: {lyrics['source_url']}"
    )
    print(response)
  • lyrics['title'] = The title of the lyrics
  • lyrics['lyrics'] = The lyrics
  • lyrics['source_url'] = The url of the lyrics

Handle Errors

try:
    song_name = "C. Sanga - Tawnmang Lasi"  # Replace with the name of the song you are requested
    lyrics = get_lyrics(song_name) # Get the lyrics
    if lyrics:
        # Format the response
        response = (
            f"{lyrics['title']}\n\n"
            f"{lyrics['lyrics']}\n\n"
            f"Source: {lyrics['source_url']}"
        )
        print(response)
except Exception as e:
    print(f"An error occurred: {e}")

Required Python 3.7 +

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

zohlathu-2.1.6.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zohlathu-2.1.6-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file zohlathu-2.1.6.tar.gz.

File metadata

  • Download URL: zohlathu-2.1.6.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for zohlathu-2.1.6.tar.gz
Algorithm Hash digest
SHA256 816a06282eb13dc306a53518e59afb0355c2cd6483f62769f05be24d2f2c3264
MD5 fd1694534c9a7223dd64ce3b5a5b87d9
BLAKE2b-256 81d8dbe648f5dcdc50d8eab87ea45223578e8edc37b016cacd99ad1cb067113d

See more details on using hashes here.

File details

Details for the file zohlathu-2.1.6-py3-none-any.whl.

File metadata

  • Download URL: zohlathu-2.1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for zohlathu-2.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a3bf33822cbbc9f9683c3e4e6b112b3baeab1c623f6028991da97afa47dc86ee
MD5 f485c38e57c224cf535ebf67d85970e8
BLAKE2b-256 8f6458f3b9f7feff3e262013d03eb7c87e08f74f2c467c6793d58d4a98d925c3

See more details on using hashes here.

Supported by

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