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_subtitle
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_subtitle 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_subtitle 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_subtitle 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)
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.
Metadata
Release files for sinhala-subtitle 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sinhala_subtitle-3.0.1.tar.gz | 3.6 kB | Without provenance | Details for sinhala_subtitle-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sinhala_subtitle-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for sinhala_subtitle-3.0.1-py3-none-any.whl |
Total release size: 7.4 kB
Release files / sinhala_subtitle-3.0.1.tar.gz
| Download URL | sinhala_subtitle-3.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eeb8fe1c1b43a118fa986f154b01ee2d3115acfd90a4f9c701c54fe5c7be0d91
|
|
BLAKE2b-256 checksum How to use checksums |
13134876348530b682b7a930112ff4a2097801494cfedcd9f6c69c0271aa9b53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / sinhala_subtitle-3.0.1-py3-none-any.whl
| Download URL | sinhala_subtitle-3.0.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0712ec237d2ecfe93f3193aa5ca2f75714569d5680adfc5e1b74b59c9492e17
|
|
BLAKE2b-256 checksum How to use checksums |
b0a164c804052e97103f3ac1be40ca08f55ab2f387167803ae613d741984d48c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for sinhala-subtitle 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.