Skip to main content

CLI tool for downloading subtitles from napiprojekt.pl

Project description

napi-py Build Status

CLI tool for downloading subtitles from napiprojekt.pl, fork of gabrys/napi.py

prerequisites

  • Python 3.6 or later
  • 7z available on PATH

installation

  • sudo pip install napi-py for system wide installation

usage as tool

  • napi-py ~/Downloads/MyMovie.mp4

usage as lib

from napi import NapiPy

movie_path = "~/Downloads/MyMovie.mp4"

napi = NapiPy()
movie_hash = napi.calc_hash(movie_path)
source_encoding, target_encoding, tmp_file = napi.download_subs(movie_hash)
subs_path = napi.move_subs_to_movie(tmp_file, movie_path)
print(subs_path)

in case of issues

  • if there's issue with weird characters in downloaded subtitles, try to re-download and use flag --from-enc utf-8
  • if there's no subtitles for your movie, there's still hope:
    • open the movie web page on napiprojekt.pl in your browser, as in example: https://www.napiprojekt.pl/napisy1,1,1-dla-55534-Z%C5%82odziejaszki-(2018)
    • choose subtitles that might match your movie, right-click them and select "Copy link" on link containing hash, which looks like this napiprojekt:96edd6537d9852a51cbdd5b64fee9194
    • use flag --hash YOURHASH in this tool, i.e. --hash 96edd6537d9852a51cbdd5b64fee9194

development

  • make config installs venv under .venv/napi-py
  • make test runs tests
  • make build creates installable package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for napi-py, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size napi_py-0.1.7-py3-none-any.whl (19.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size napi-py-0.1.7.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page