{ "info": { "author": "Jelomite", "author_email": "moshesher1998@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "# Horrible Downloader [![Codacy Badge](https://api.codacy.com/project/badge/Grade/4a13ba5715f94427998e63968ea710d7)](https://app.codacy.com/app/Jelomite/horrible-downloader?utm_source=github.com&utm_medium=referral&utm_content=Jelomite/horrible-downloader&utm_campaign=Badge_Grade_Settings) [![Build Status](https://travis-ci.org/Jelomite/horrible-downloader.svg?branch=master)](https://travis-ci.org/Jelomite/horrible-downloader) [![PyPI version](https://badge.fury.io/py/horrible-downloader.svg)](https://badge.fury.io/py/horrible-downloader)\n\n![horrible subs banner](http://horriblesubs.info/images/b/ccs_banner.jpg)\n\n\n\n*Horrible Downloader* is a Python wrapper around the [HorribleSubs](https://horriblesubs.info/) API. It comes with a powerful set of extra features, which allow users to automatically download new episodes and batches of existing shows. The module tracks the downloaded files and allows you to continue from where you left.\n\n## Installation\n\n```sh\n> pip install horrible-downloader\n```\n\n## Dependencies\n**_horrible-downloader_** uses [WebTorrent-CLI](https://github.com/webtorrent/webtorrent-cli) to download its magnets.\nThe dependency is automatically downloaded with the installation script, but for those who want to install it manualy - simply run ```npm install webtorrent-cli -g```.\n\n**NOTE:** _WebTorrent_ is a NodeJS application, which means you must have Node installed.\n\n## Documentation\n\n#### Usage\nexample usage of the API inside of Python:\n```python\nfrom HorribleDownloader import Parser, ConfigManager\n\np = Parser()\nconfig = ConfigManager()\n\ndownload = []\nfor show, last_watched in config.subscriptions:\n episodes = p.get_episodes(show)\n new = filter(lambda s: s[\"episode\"] > last_watched, episodes)\n download.extend(new)\n\n```\n\n### Using the Parser\nfor us to do simple interactions with the API we must first initiate a parser object using the `HorribleDownloader.Parser()`.\n\nThe parser will allow us to fetch data from [horriblesubs](horriblesubs.info). here are the methods and properties:\n\n- **shows** - List all available shows. equivalent to https://horriblesubs.info/shows/.\n- **current_shows** - List all currently airing shows. equivalent to https://horriblesubs.info/current-season/.\n- **get_episodes(show: str, limit=1000)** - Returns a list of episodes from the specified show. By default will return the first 1000 episodes (of course, most shows don't even reach the 100th episode).\n- **get_batches(show: str)** - Returns the batches of the show (if it exists).\n\n#### Episode Object\n\nWhen referring to an episode, the actual representation of it is an object of the following structure:\n```python\n{\n \"title\": \"the title of the show\",\n \"episode\": \"episode number\", # represented with a float.\n \"480\": { # all of the files are in 480p resolution\n \"Magnet\" \"link to magnet\",\n \"Torrent\": \"link to the .torrent file\",\n \"XDCC\": \"XDCC query\", # https://xdcc.horriblesubs.info/\n \"Uploaded.net\": \"uploaded.net link to .mkv\",\n \"FileUpload\": \"fileupload link to .mkv\",\n \"Uplod\": \"uplod link to .mkv\"\n },\n \"720\": { # exactly the same as the 480, but with 720p resolution\n \"Magnet\" \"link to magnet\",\n \"Torrent\": \"link to the .torrent file\",\n \"XDCC\": \"XDCC query\",\n \"Uploaded.net\": \"uploaded.net link to .mkv\",\n \"FileUpload\": \"fileupload link to .mkv\",\n \"Uplod\": \"uplod link to .mkv\"\n },\n \"1080\": { # 1080p resolution\n \"Magnet\" \"link to magnet\",\n \"Torrent\": \"link to the .torrent file\",\n \"XDCC\": \"XDCC query\",\n \"Uploaded.net\": \"uploaded.net link to .mkv\",\n \"FileUpload\": \"fileupload link to .mkv\",\n \"Uplod\": \"uplod link to .mkv\"\n }\n}\n```\n\n---\n\n## Horrible-Subs CLI\nA powerful tool for managing and downloading anime in an automatic manner. To run it, simply call `horrible-downloader`.\nThe CLI is simple, yet effective. It allows you to download the current airing anime, based on your specified subscriptions ([see Configuration](#configuration)), and downloading all the episodes of a desired anime.\n\n#### Featurs:\n* use **_horriblesubs_** from the command line.\n* minimal configuration\n* supports download resuming -- continue exactly where you left!\n* allows for smart episode specification parsing.\n\n#### Flags & Options:\nThe CLI supports manual download of different anime with various options.\nFull list of flags and options:\n```\n$ horrible-downloader --help\nusage: horrible-downloader [-h] [-d DOWNLOAD] [-o OUTPUT] [-e EPISODES] [-l]\n [-r RESOLUTION] [---subscribe SUBSCRIBE] [--batch]\n [-q]\n\nhorrible script for downloading anime\n\noptional arguments:\n -h, --help show this help message and exit\n -l, --list display list of available shows\n -q, --quiet set quiet mode on\n -d DOWNLOAD, --download DOWNLOAD download a specific anime\n -o OUTPUT, --output OUTPUT directory to which it will download the files\n -e EPISODES, --episodes EPISODES manually specify episodes to download\n -r RESOLUTION, --resolution RESOLUTION specify resolution quality, defaults to config file\n --subscribe SHOW [-e EPISODE] add a show to the config file.\n --batch search for batches as well as regular files\n\n```\n##### Episodes & Resolution Formating:\nThose two flags have a special syntax which allows for a better specification interface.\n\n###### When using **_episodes_** flag, you can use the following:\n\n|character|usage|example|\n|---------|-----|-----|\n|,| allows to specify more than one episode or option.|1,6|\n|-| specify a range of episodes, including start and end.| 4-10|\n|>| bigger than, must be last in order.| 7>|\n|<| smaller than, must be first in order.| <10|\n|=|equals, in conjunction with < or >, includes the episode number.| 11>=|\n\n###### The **_resolution_** flag syntax is simple, just set the resoultions with the comma (,) between.\n\n`$ horrible-downloader -r 720,1080`\n\n##### Example usage:\nThe command for downloading episodes 1,2,4,5,6 of \"One-Punch Man\" to the `~/Videos/Anime` folder:\n```bash\n$ horrible-downloader -d \"one punch man\" -e 1,2,4-6 -o ~/Videos/Anime\n```\n#### Configuration\nOnce the script is called, the configuration file will be generated in the user's config directory:\n`~/.config/horrible-downloader/conf.ini`.\nBy default, the config file contains all of the current airing anime commented out. To subscribe to an anime, simply uncomment it and specify which episode you're currently on.\n\n##### example config file:\n```\n[settings]\nresolution = 1080\ndownload_dir = ~/Videos/Anime\n\n[subscriptions]\none punch man = 11\nlupin iii part v = 8\njojo's bizzare adventure - golden wind = 0\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Jelomite/horrible-downloader", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "horrible-downloader", "package_url": "https://pypi.org/project/horrible-downloader/", "platform": "", "project_url": "https://pypi.org/project/horrible-downloader/", "project_urls": { "Homepage": "https://github.com/Jelomite/horrible-downloader" }, "release_url": "https://pypi.org/project/horrible-downloader/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "HorribleSubs API", "version": "1.0.3" }, "last_serial": 5725223, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "d92c9bf001561ddf3ee14d6412db3a69", "sha256": "1694563c0948b3202680f8e3305d34684be26e33dd26f6aa6990fe2111271dee" }, "downloads": -1, "filename": "horrible-downloader-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d92c9bf001561ddf3ee14d6412db3a69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10784, "upload_time": "2019-08-24T05:49:08", "url": "https://files.pythonhosted.org/packages/ae/e3/e4c6f0834540f41d9e88bd6d9dbf126fea537521fd39da17b98bfb47c41f/horrible-downloader-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "682d2273aafc36aafa451f591c22ad9e", "sha256": "f1267ced7623ad6908d8735370f44d47bb4303a07c3dc984d6ebb715c149e6cd" }, "downloads": -1, "filename": "horrible-downloader-1.0.2.tar.gz", "has_sig": false, "md5_digest": "682d2273aafc36aafa451f591c22ad9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10780, "upload_time": "2019-08-24T06:02:32", "url": "https://files.pythonhosted.org/packages/0e/ef/01f79367779e354848ca5ee5ba2724dc90461114f4475b1f126ae990f20a/horrible-downloader-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "1d75c43e5d5e745709f5bd45aaac2f94", "sha256": "e2128b712e83590e4fac456a534d1c1e2794aed6eb8e2417f82009bab088ab6a" }, "downloads": -1, "filename": "horrible-downloader-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1d75c43e5d5e745709f5bd45aaac2f94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10866, "upload_time": "2019-08-24T20:08:09", "url": "https://files.pythonhosted.org/packages/45/73/4c9ce98190625dae67bcb5d53592bc27a8049bbbaee1c7bd1cf8d9760f92/horrible-downloader-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1d75c43e5d5e745709f5bd45aaac2f94", "sha256": "e2128b712e83590e4fac456a534d1c1e2794aed6eb8e2417f82009bab088ab6a" }, "downloads": -1, "filename": "horrible-downloader-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1d75c43e5d5e745709f5bd45aaac2f94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10866, "upload_time": "2019-08-24T20:08:09", "url": "https://files.pythonhosted.org/packages/45/73/4c9ce98190625dae67bcb5d53592bc27a8049bbbaee1c7bd1cf8d9760f92/horrible-downloader-1.0.3.tar.gz" } ] }