Skip to main content

Sinhala Subtitles Downloader

This Python library makes it easy to download Sinhala subtitles for TV series and movies. It currently supports two websites, Baiscope and Cineru.

Installation

You can install the library using pip:

pip install sinhala_subtitles

Usage

To use the library, simply import it and call one of the following functions:

search(query, site=None)

Searches for available Sinhala subtitles for a given TV series or movie.

from sinhala_subtitles import SinhalaSubtitles 

# Create an instance of the SinhalaSubtitles class 
subtitles = SinhalaSubtitles 

# Search for  Sinhala subtitles for Pirates of the Caribbean movie" 
results = subtitles.search('Pirates of the Caribbean') 

# Print the list of available subtitle files
for  result  in results: 
	print(result)

search subtitles with mentioning website :

results = subtitles.search('Pirates of the Caribbean', site='baiscopelk')
  • query: The name of the TV series or movie.
  • site: Optional. The website to search on. Can be "baiscopelk" or "cineru".

Returns a list of available Sinhala subtitle files.

download(page_url)

Downloads a Sinhala subtitle file from a given URL.

from sinhala_subtitles import SinhalaSubtitles

# Create an instance of the SinhalaSubtitles class
subtitles = SinhalaSubtitles

# Download Sinhala subtitles for the movie "Pirates of the Caribbean: Dead Men Tell No Tales"
url = 'https://www.baiscopelk.com/pirates-of-the-caribbean-dead-men-tell-no-tales-2017-with-sinhala-subtitles/'
subtitles.download(url)
  • page_url: The URL of the subtitle file to download.

Returns True if the download is successful, False otherwise.

bulk(bulk_url)

Downloads a bulk of Sinhala subtitle files from a given URL.

from sinhala_subtitles import SinhalaSubtitles

# Create an instance of the SinhalaSubtitles class
subtitles = SinhalaSubtitles

# Download a bulk of Sinhala subtitles for the TV series "Supernatural"
url = 'https://www.baiscopelk.com/tv-series/supernatural-2005/'
subtitles.bulk(url,download_path="Downloads")
  • bulk_url: The URL of the subtitle file bulk to download.

Returns a list of downloaded subtitle files.

License

This library is released under the MIT license.

Release files for sinhala-subtitles 4.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinhala-subtitles 4.0.1
File Size Uploaded
sinhala_subtitles-4.0.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinhala-subtitles 4.0.1
File Interpreter ABI Platform
sinhala_subtitles-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / sinhala_subtitles-4.0.1.tar.gz

Download URL sinhala_subtitles-4.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
03dd0d1e1307f21972a8628a48bc9355ffef1d51c79cdd45efbc8d20f2dae95d
BLAKE2b-256 checksum
How to use checksums
ed72fbbf8e8512e53c7db12050dc6d8674a29e4d882b1b881159b23b0b95f821
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / sinhala_subtitles-4.0.1-py3-none-any.whl

Download URL sinhala_subtitles-4.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
526998594cc6c5b704e56071f3690d1e30c41887880aba079545d637516752ca
BLAKE2b-256 checksum
How to use checksums
548ed23a3afa0b02e88c4908c7cab9e13bfb467e218a4b8b5a6112bfc83deea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

4.0.1 This release

2 release files

3.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page