Python wrapper for Kol Halashon API
Project description
Kol Halashon API
Python wrapper for Kol Halashon website API.
Installation
pip install kolhalashon
Usage
from kolhalashon.api import KolHalashonAPI, QualityLevel
from kolhalashon.models.exceptions import *
from dotenv import load_dotenv
load_dotenv()
api = KolHalashonAPI(
use_session=False,
session_file='session.pkl'
)
category = api.search_items("אברהם")
if category.shiurim:
print("Shiurim found:")
for shiur in category.shiurim:
print(f"shiur: {shiur['SearchItemTextHebrew']}, ID: {shiur['SearchItemId']}")
else:
print("No shiurim found.")
file_id = category.shiurim[0]['SearchItemId']
try:
file_name = api.download_file(file_id, QualityLevel.AUDIO)
print(f"Shiur downloaded: {file_name}")
except AuthenticationError as e:
print(f"Authentication failed: {e}")
except DownloadFailedException as e:
print(f"Download failed: {e}")
except SessionDisabledException as e:
print(f"Session disabled: {e}")
except Exception as e:
print(f"An error occurred: {e}")
Features
- Search shiurim
- Download audio/video content
- Browse by Rabbi
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
kolhalashon-1.0.2.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file kolhalashon-1.0.2.tar.gz
.
File metadata
- Download URL: kolhalashon-1.0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e5f2c8332b831a6832f7346e2e25beb2836de6cf80c55f5dca850ab1529ff1f |
|
MD5 | f8d16155dcaf48e0033f1bcdf4f5a0da |
|
BLAKE2b-256 | ae76ea2ec1565080ba1d5e8c47b972b128c20973182bfd30b5182966c8f4b3ad |
File details
Details for the file kolhalashon-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: kolhalashon-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1daf3fa2948b16b06b015f1e508dcdc8f7bccd2c9d0a1c309dd648bace68f01c |
|
MD5 | a01218c0336e151f5968a24a2f098caf |
|
BLAKE2b-256 | 50b34c8ff11da326b5f18992c8ddd50f7a973f20731bc666145c6256cced8182 |