Skip to main content

A small Python parser for installing anime episodes on user device from service jut.su

Project description

jutlib v0.1.0

Easy Python library for downloading anime episodes to user devices from service jut.su.

Characteristics and functionality

  • Intuitive to use methods ;
  • The ability to customize your configuration for the installer with the ability to change: title case, space separator, and resolution quality of the installing video ;
  • Test files demonstrating how the library works in several directions in this folder ;
  • Ease of integration of the library into your independent projects.

How to start using

  • First, make sure that your device has Python version 3.9 or higher (using Python several versions lower may be possible, but I can’t tell you about stability) ;
  • After that you can start installing the library in your virtual environment (global or local - it doesn’t matter) :
# for linux
python3 pip install jutsu-downloader

# for windows
pip install jutsu-downloader
  • After installing the library in the environment, you can start using it for your own purposes ;
  • Although the library does not provide such a wide range of functionality compared to collaborations, it does not contain any unnecessary mechanisms and is designed exclusively for its purpose.

Examples of using

What about documentation without examples? Let's go through the basic methods of this library :

  • Initialization :
# import main class from library
from jutsu.downloader import JutSu

# create an instance of the class "JutSu" based on the url you provided
jut = JutSu('YOUR URL TO DESIRED EPISODE')

# load data from the page you received and write it to the class parameters
jut.load()
  • Extracting the video and installing it on the device :
jut = JutSu('URL')
jut.load()
jut.download()
  • For convenience or debugging, if desired, you can display the received data loaded into the instance :
jut = JutSu('URL')
jut.load()
print(f'{jut.get_original_name()} : {jut.get_direct_link()}')

Features and customizations

Editing install configurations

  • As I mentioned earlier - the library has slight customization for integration into different projects. Although the instance already has a configuration set for processes, you can edit and replace the default values ;
  • To change the configuration of settings, the following method is built into the library :
# before:  "Anime Episode Name"
jut.configure(
    download_res=720,  # video quality category
    name_separator='_',  # parameter that will replace all spaces in the episode name
    register_style='upper'  # choose which register the names will be in
)
# after:   "ANIME_EPISODE_NAME"
  • But as you understand, customization settings also have their own limits that you cannot go beyond ;
  • I advise you to familiarize yourself with the list of acceptable settings for the specified parameters :
download_resolutions = (
    1080,
    720,
    480,
    360
)

name_separators = (
    None  # You can use absolutely any values as separators
)

register_styles = (
    'default',
    'upper',
    'lower'
)

Editing static episode names

  • Looking at the principle of operation of this library, one may ask: "how, instead of the title of the episode loaded by the built-in method from the title on the page, can you give your name under which to install the video?" ;
  • So, for such cases, there is also a method with which you can set your name for the episode in the class instance parameter after loading the page data :
# use "jut.load()" before working with names
jut.set_name('YOUR NAME')
# done, video has heady to downloading
  • If you need exactly the register in which you specified the new name, do not forget to set the "default" register style in the configuration :
jut.configure(register_style='default')
  • This will help you avoid problems with changing your name during the pre-installation processing.

Project details


Download files

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

Source Distribution

jutlib-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jutlib-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file jutlib-0.1.0.tar.gz.

File metadata

  • Download URL: jutlib-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for jutlib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ab130e8a7e1791f2c09251b151315045fb0458bdc0394e0a579e4e665295fcfd
MD5 94b98057dc4d6e87df836dfff658f7bf
BLAKE2b-256 c22cb92efbd4d0407cd3e20786eeb939bc091db9905eaf3c19261d9c8bf1a40f

See more details on using hashes here.

File details

Details for the file jutlib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jutlib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.6

File hashes

Hashes for jutlib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 360f9e84bd66306b05f4df49324efbf1b3145d9aab9e53999fc170652570e70d
MD5 a239308909e1b9131f8f825ccdb8b852
BLAKE2b-256 f06844e597413e1a4c7b55372e81b88058782469f7dcd3bbe42d5eec2f426999

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page