OpenSubtitles Subtitles Downloader - OSSD
This package allows you to download subtitles as text from www.opensubtitles.com. All you need to have is Selenium with Chrome driver, requests package (pip install requests) and this OSSD package.
Instalation
pip install ossd
PyPi page - https://pypi.org/project/ossd/
Usage
import ossd
ossd.get_subtitles(driver, movie_name)
- driver -- Chrome Driver (Selenium)
- movie_name -- Name of movie which subtitles you want to download
Methods
get_subtitles -- returns most downloaded subtitles text, if error occurs then returns " " (whitespace) and prints error code parse_subtitles -- parses script lines from default format into one line only text format, skips ads on the script start
Example
import ossd
from selenium import webdriver
driver = webdriver.Chrome(executable_path=driverPath)
text = ossd.get_subtitles(driver, "Star Wars: A New Hope")
Output (in variable text)
Same as here.
0
00:02:40,680 --> 00:02:42,557
Did you hear that? \1 \ 00:02:42,680 --> 00:02:45,319
They shut down the main reactor. \ We'll be destroyed for sure. \2
00:02:45,440 --> 00:02:46,873
This is madness. \3
00:02:56,560 --> 00:02:57,913
We're doomed.
....
one_text = ossd.parse_subtitles(text)
Output (in variable one_text)
Did you hear that? They shut down the main reactor. We'll be destroyed for sure. This is madness. We're doomed. ...
Licence - MIT
Free for use, editing, selling, just mention author
Development
- Clean ununsed:
rm -rf build/ dist/ *egg* **.pyc __pycache__ - Build package:
python setup.py sdist bdist_wheel - deploy package:
python -m twine upload dist/*
Metadata
Release files for ossd 1.0.8
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 |
|---|---|---|---|---|
| ossd-1.0.8.tar.gz | 3.5 kB | Without provenance | Details for ossd-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ossd-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for ossd-1.0.8-py3-none-any.whl |
Total release size: 7.5 kB
Release files / ossd-1.0.8.tar.gz
| Download URL | ossd-1.0.8.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9226863c02f57f4b6e00ed12294bd8ad530003b982bb0a6d5b5a7bed3b857bd
|
|
BLAKE2b-256 checksum How to use checksums |
0b2ee76e08f1257b9e5645f7d53c5ff35d1c6e840e41dd1a651c5a947c929711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.4
|
Release files / ossd-1.0.8-py3-none-any.whl
| Download URL | ossd-1.0.8-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
247bdc0ce741ea3e985656ea36996a8ef89dfc67c0644c4f4cd4d4a66e59b51f
|
|
BLAKE2b-256 checksum How to use checksums |
e292a4c4fc97b4f99404db1e192cc7f5986ddcba6f80f30abbc04ab5fa9c8b98
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.4
|
Security for ossd 1.0.8
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.