{ "info": { "author": "fffonion", "author_email": "fffonion@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Natural Language :: Chinese (Simplified)", "Natural Language :: Chinese (Traditional)", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\ufeff# E-Hentai D\u014djinshi Downloader\n\n[![Build Status](https://travis-ci.org/fffonion/xeHentai.svg?branch=master)](https://travis-ci.org/fffonion/xeHentai)\n\n[\u7b80\u4f53\u4e2d\u6587](README.chs.md) [\u7e41\u9ad4\u4e2d\u6587](README.cht.md)\n\n[xeHentai WebUI](https://github.com/fffonion/xeHentai-webui)\n\n## TL;DR\n\nWindows users can download packed binaries from [here](https://github.com/fffonion/xeHentai/releases) or [here](http://dl.yooooo.us/share/xeHentai/). The package is built using [PyInstaller](http://www.pyinstaller.org/).\n\nOr run directly from source code:\n\n```shell\npip install -U requests[socks]\ngit clone https://github.com/fffonion/xeHentai.git\ncd xeHentai\npython ./setup.py install\nxeH\n```\n\nThe program is running in non-interactive mode by default. To run interactively, use `xeH.py -i`.\n\n## For pros\n\n### Configuration file\n\nIf you are running from source code, please copy `xeHentai/config.py` to your current directory first. Use that file as your config file.\n\nThe priority of configuration is: Interactive inputs > Command line options > User config.py > Internal config.py.\n\nConfiguration keys\uff1a\n\n - **daemon** Set to run in default mode, can only use on posix-compatible systems. Refer to [Running Modes](#running-modes). Default to `False`.\n - **dir** Download directory. Default to current directory.\n - **download_ori** Set to download original images or not. Default to `False`.\n - **jpn_title** Set to select Japanese title or not. If set to `False`, English or Romaji title will be used. Default to `True`.\n - **rename_ori** Set to rename images to their orginal names. If set to `False`, image will be named in sequence numbers. Default to `False`.\n\n - **proxy** Proxy list. Refer to [Proxies](#proxies).\n - **proxy_image** Set to use proxy both on downloading images and scanning webpages. Default to `True`.\n - **proxy_image_only** Set to use proxy only on downloading images. Default to `False`.\n - **rpc_interface** RPC server binding IP. Refer to [JSON-RPC](#json-rpc). Default to `localhost`.\n - **rpc_port** RPC server binding port. Default to `none` (not serving).\n - **rpc_secret** RPC secret key. Default to `None`.\n - **delete_task_files** Set to delete downloaded files when deleting a task. Default to `False`.\n - **make_archive** Set to make a ZIP archive after download and delete downloaded directory. Default to `False`.\n - **download_range** Set image download range. Refer to [Download range](#download-range). Default to download all images.\n - **scan_thread_cnt** Thread count for scanning webpages. Default to `1`.\n - **download_thread_cnt** Thread count for downloading images. Default to `5`.\n - **download_timeout** Timeout of download images. Default to `10`s.\n - **ignored_errors** Set the error codes to ignore and continue downloading. Default to *empty*. Error codes can be obtained from [const.py](xeHentai/const.py).\n - **log_path** Set log file path. Default to `eh.log`.\n - **log_verbose** Set log level with integer from 1 to 3. Bigger value means more verbose output. Default to `2`.\n - **save_tasks** Set to save uncompleted tasks in `h.json`. Default to `False`.\n \n\n### Command line options\n```\nUsage: xeH [-u USERNAME] [-k KEY] [-c COOKIE] [-i] [--daemon] [-d DIR] [-o]\n [-j BOOL] [-r BOOL] [-p PROXY] [--proxy-image | --proxy-image-only]\n [--rpc-interface ADDR] [--rpc-port PORT] [--rpc-secret ...]\n [--delete-task-files BOOL] [-a BOOL] [--download-range a-b,c-d,e]\n [-t N] [--timeout N] [-f] [-l /path/to/eh.log] [-v] [-h]\n [--version]\n [url [url ...]]\n\nxeHentai Downloader NG\n\npositional arguments:\n url gallery url(s) to download\n\noptional arguments:\n -u USERNAME, --username USERNAME\n username\n -k KEY, --key KEY password\n -c COOKIE, --cookie COOKIE\n cookie string, will be overriden if given -u and -k\n -i, --interactive interactive mode, will be ignored in daemon mode\n (default: False)\n --daemon daemon mode, can't use with -i (default: False)\n -d DIR, --dir DIR set download directory (current:\n /Users/fffonion/Dev/Python/xeHentai)\n -o, --download-ori download original images, needs to login (current:\n True)\n -j BOOL, --jpn-title BOOL\n use Japanese title, use English/Romaji title if turned\n off (default: True)\n -r BOOL, --rename-ori BOOL\n rename gallery image to original name, use sequence\n name if turned off (default: False)\n -p PROXY, --proxy PROXY\n set download proxies, can be used multiple times,\n currenlty supported: socks5/4a, http(s), glype.\n Proxies are only used on webpages by default (current:\n ['socks5h://127.0.0.1:16963'])\n --proxy-image use proxies on images and webpages (default: True)\n --proxy-image-only only use proxies on images, not webpages (current:\n False)\n --rpc-interface ADDR bind jsonrpc server to this address (current:\n localhost)\n --rpc-port PORT bind jsonrpc server to this port (default: 8010)\n --rpc-secret ... jsonrpc secret string (default: None)\n --delete-task-files BOOL\n delete downloaded files when deleting a task (default:\n True)\n -a BOOL, --archive BOOL\n make an archive (.zip) after download and delete\n directory (default: False)\n --download-range a-b,c-d,e\n specify ranges of images to be downloaded, in format\n start-end, or single index, use comma to concat\n multiple ranges, e.g.: 5-10,15,20-25, default to\n download all images\n -t N, --thread N download threads count (default: 5)\n --timeout N set image download timeout (default: 10s)\n -f, --force download regardless of quota exceeded warning\n (default: False)\n -l /path/to/eh.log, --logpath /path/to/eh.log\n define log path (current:\n /Users/fffonion/Dev/Python/xeHentai/eh.log)\n -v, --verbose show more detailed log (default: 3)\n -h, --help show this help message and exit\n --version show program's version number and exit\n\n```\n\nIf options are not defined, values from `config.py` will be used.\n\n### JSON-RPC\n\nIf `rpc_interface` and `rpc_port` are set, xeHentai will start a RPC server. The request and response follows the [JSON-RPC 2.0](http://www.jsonrpc.org/specification) standard.\n\n```\n$ curl localhost:8010/jsonrpc -d '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\":\"xeH.addTask\", \"params\":[[args],{kwargs}]}'\n{\"jsonrpc\": \"2.0\", \"id\": 1, \"result\": \"36df423e\"}\n```\n\n`rpc_secret` is a secret key to your RPC server. If it's set, client should include this value in the request. For example when `rpc_secret` is set to **hentai**: \n```\n$ curl localhost:8010/jsonrpc -d '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\":\"xeH.addTask\", \"params\":[\"token:hentai\",[args],{kwargs}]}'\n{\"jsonrpc\": \"2.0\", \"id\": 1, \"result\": \"36df423e\"}\n```\n\nThe method filed should start with **xeH.** and should be a public class method of **xeHentai** from [core.py](xeHentai/core.py). And change the name from *lower_case_with_underscores* notation to *lowerCamelCase* notation. For example, `add_task` becomes `addTask`.\n\nRefer to **xeHentai** class from [core.py](xeHentai/core.py) for parameters list.\n\nIf your browser has a Userscript plugin, you can use [xeHentaiHelper.user.js](http://dl.yooooo.us/userscripts/xeHentaiHelper.user.js) to create tasks directly on e-hentai website. Chrome user will need to install [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo), for firefox [Greasemonkey](https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/), and ViolentMonkey for Opera and Maxthon users.\n\n**Because e-hentai has enabled https, Chrome user will needs to click on the shield icon in the far right of the address bar and click \"Load anyway\" or \"Load unsafe scripts\"**\n\n### Running modes\n\nIf xeHentai is ran from command line interface or interative mode, the program will exit after it finishes the tasks in `h.json` (if exists) and given URL.\n\nIf there's no URL given from command line, the program will exit after it finishes the tasks in `h.json`(if exists).\n\nIf program is running on daemon mode (`-d` is set or `daemon` is set to `True`), the program will keep running in background.\n\n### Proxies\n\nxeHentai supports three types of proxies:\n\n - socks proxy: `socks5h://127.0.0.1:1080`. If you want to resolve DNS on client side, use `socks5://127.0.0.1:1080`.\n - http(s) proxy: `http://127.0.0.1:8080`.\n - glype proxy: `http://example.com/browse.php?u=a&b=4`. Please set value of `b` accordingly. glype is a widely used PHP proxy script. When using, uncheck **Encrypt URL**, **Remove Scripts** and check **Allow Cookies** and open a random URL. The paste the address into configuration.\n\nMultiple proxies can be specified at the same time. The format can be like : `['socks5h://127.0.0.1:1080', 'http://127.0.0.1:8080']`. \n\nBy default proxies are used to download images and scan webpages. If you don't want to use proxy on downloading images, set `proxy_image` to `False`.\n\nglype users are encouraged to set `proxy_image` to `False`\u3002\n\nIf you only want to use proxy to download image, set `proxy_image_only` to **True** in `config.py` or use the `--proxy-image-only` CLI option. If both `proxy_image` and `proxy_image_only` are set to **True**, `proxy_image` will be ignored.\n\n### Download range\n\nDownload ranges are set in format `start_positoin-end_positoin`. For example, `5-10` means number download first 5 to 10 images, including 5 and 10. Or use `15` to download number 15 only.\n\nMultiple ranges can be seperated with comma. For example,`5-10,15`.\n\nIf no range is given, xeHentai will download all images.\n\n\n## Misc\n\n### Image limit\n\nDownloading images will be count towards image limit. This is calculated regarding the popularity of gallery, the server load and/or Hentai@Home bandwidth by e-hentai server.\n\n## License\n\nGPLv3\n***\n![Blog](https://s.w.org/about/images/logos/wordpress-logo-32-blue.png)  [Blog](https://yooooo.us)\n\n\n# Changelog\n\n## 2.020\n- \u589e\u52a0RPC\u5e2e\u52a9\u51fd\u6570\uff1a`get_info`\uff0c`get_config`\uff0c`update_config`\uff0c`get_image`\n- \u589e\u52a0\u901a\u8fc7RPC\u770b\u56fe\u548c\u4e0b\u8f7d\u538b\u7f29\u5305\u529f\u80fd\n- \u589e\u52a0`delete_task_files`\u9009\u9879\uff0c\u8bbe\u7f6e\u662f\u5426\u5220\u9664\u4efb\u52a1\u65f6\u540c\u65f6\u5220\u9664\u4e0b\u8f7d\u7684\u6587\u4ef6\n- \u4fee\u590dWindows\u6587\u4ef6\u5939\u4e0d\u80fd\u4ee5\u7a7a\u683c\u7ed3\u5c3e\u4ee5\u53ca\u6587\u4ef6\u4e0d\u80fd\u4ee5`.`\u7ed3\u5c3e\n- \u4fee\u590d\u4e0b\u8f7d\u65f6\u7684\u4e34\u65f6\u6587\u4ef6\u5728Windows\u4e0b\u62a5\u9519Error 32\u7684\u95ee\u9898\n\n## 2.019\n- \u589e\u52a0\u56fe\u7247\u5730\u5740\u89e3\u6790\u65f6\u7684\u9519\u8bef\u5904\u7406\n- \u589e\u52a0\u4f7f\u7528\u6d41\u6a21\u5f0f\u4e0b\u8f7d\u56fe\u7247\uff0c\u4f18\u5316\u5224\u65ad\u4e27\u5c38\u7ebf\u7a0b\n- \u4fee\u590d\u65e0\u6cd5\u4ece\u73af\u5883\u53d8\u91cf\u4e2d\u83b7\u5f97LOCALE\u65f6\u7684\u95ee\u9898\n- \u4fee\u590dunichr\u88ab\u5f53\u6210\u5c40\u90e8\u53d8\u91cf\u7684\u95ee\u9898\n- \u4fee\u590d\u4ea4\u4e92\u6a21\u5f0f\u5728Python3\u4e2d\u7684\u4e00\u4e2a\u95ee\u9898\n\n## 2.018\n- \u589e\u52a0`jpn_title`\u9009\u9879\uff0c\u9009\u62e9\u662f\u5426\u4f7f\u7528\u65e5\u8bed\u6807\u9898\n- \u589e\u52a0`download_range`\u9009\u9879\uff0c\u9009\u62e9\u4e0b\u8f7d\u8303\u56f4\n- \u589e\u52a0`timeout`\u9009\u9879\uff0c\u8bbe\u7f6e\u4e0b\u8f7d\u56fe\u7247\u7684\u8d85\u65f6\n- \u589e\u52a0`proxy_image_only`\u9009\u9879\uff0c\u8bbe\u7f6e\u4ec5\u4f7f\u7528\u4ee3\u7406\u4e0b\u8f7d\u56fe\u7247\n- \u547d\u4ee4\u884c\u589e\u52a0`--force`\u9009\u9879\uff0c\u8bbe\u7f6e\u5ffd\u7565\u914d\u989d\u7ee7\u7eed\u4e0b\u8f7d; \u914d\u7f6e\u589e\u52a0`ignored_errors`\u9009\u9879\uff0c\u8bbe\u7f6e\u5ffd\u7565\u7684\u9519\u8bef\u7801\n- \u68c0\u67e5\u4e0b\u8f7d\u7684\u56fe\u7247\u662f\u5426\u5b8c\u6574\n- \u8bc6\u522b`socks5h`\u4ee3\u7406\u5b57\u7b26\u4e32\n\n## 2.017\n- \u4fee\u590d\u5339\u914d\u7f51\u5740\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\n- \u4fee\u590d\u8868\u7ad9\u81ea\u52a8\u8f6c\u6362\u91cc\u7ad9\u903b\u8f91\n- \u4fee\u590d\u4e0b\u8f7d\u56fe\u7247\u91cd\u8bd5\u540e\u91cd\u547d\u540d\u5931\u8d25\u7684\u95ee\u9898\n- \u4fee\u590d\u539f\u59cb\u6587\u4ef6\u540d\u4e0e\u81ea\u52a8\u7f16\u53f7\u51b2\u7a81\u65f6\u91cd\u547d\u540d\u5f02\u5e38\u7684\u95ee\u9898\n\n## 2.016\n- \u4fee\u590d\u8d85\u51fa\u914d\u989d\u7684\u5224\u65ad\n- \u4fee\u590d\u53ef\u80fd\u4f1a\u4e0b\u5230\u8bc4\u8bba\u4e2d\u7684\u56fe\u7684\u95ee\u9898\n- \u4fee\u590d\u65e0\u6cd5\u5339\u914d\u5b89\u88c5\u5728\u6839\u76ee\u5f55glype\u7684\u4ee3\u7406\u95ee\u9898\n- \u67d0\u4e9b\u9519\u8bef\u73b0\u5728\u4f1a\u663e\u793a\u8be6\u7ec6\u4fe1\u606f\n- \u589e\u52a0`proxy_image`\u9009\u9879\uff0c\u9009\u62e9\u662f\u5426\u4f7f\u7528\u4ee3\u7406\u4e0b\u8f7d\u56fe\u7247\n\n## 2.015\n- \u663e\u793a\u91cd\u547d\u540d\u65f6\u7684\u9519\u8bef\n- \u4fee\u590d\u6269\u5c55\u540d\u4e2d\u591a\u4f59\u7684`.`\n- \u4fee\u590dWindows\u4e0b\u6587\u4ef6\u540d\u7684\u4fdd\u7559\u5b57\u7b26`<`, `>`\n\n## 2.014\n- \u4fee\u590dcookie\u4e2d\u53ea\u6709nw\u5224\u65ad\u4e3a\u5df2\u767b\u5f55\u7684bug\n- \u767b\u5f55\u5931\u8d25\u65f6\u663e\u793a\u7f51\u9875\u4e0a\u7684\u9519\u8bef\u4fe1\u606f\n- \u4ea4\u4e92\u652f\u6301\u9017\u53f7\u5206\u5272\u591a\u4e2a\u4efb\u52a1\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u652f\u6301\u540c\u65f6\u6dfb\u52a0\u591a\u4e2a\u4efb\u52a1\n- \u4fee\u590d\u91cd\u547d\u540d\u7684bug\n\n## 2.013\n- \u4fee\u590d\u9875\u6570>=1000\u9875\u65f6\u62bd\u98ce\u7684bug\n- \u539f\u59cb\u6587\u4ef6\u540d\u51b2\u7a81\u65f6\u81ea\u52a8+1\n\n## 2.012\n- \u4fee\u590dWindows\u4e0b\u4e2d\u6587\u8def\u5f84\u7684\u95ee\u9898\n\n## 2.011\n- \u4fee\u590d\u6bcf\u9875\u7f29\u7565\u56fe\u6570\u91cf\u4e0d\u662f40\u65f6\u4e0b\u8f7d\u4e0d\u5b8c\u6574\u7684bug\n- 90\u79d2\u6ca1\u6709\u65b0\u4e0b\u8f7d\u56fe\u7247\u5219\u81ea\u52a8\u7ed3\u675f\u4efb\u52a1\n- \u672c\u5b50\u5305\u542b\u91cd\u590d\u56fe\u7247\u65f6\u76f4\u63a5\u590d\u5236\n\n## 2.010\n- \u56fe\u7247404\u65f6\u91cd\u8bd5\n\n## 2.009\n- \u4ea4\u4e92\u6a21\u5f0f\u9ed8\u8ba4\u503c\u6539\u4e3a\u914d\u7f6e\u4e2d\u8bbe\u7f6e\u7684\u503c\n\n## 2.008\n- \u8df3\u8fc7Content Warning\n\n## 2.007\n- \u4fee\u590d\u672c\u5b50\u4e2d\u6709\u91cd\u590d\u56fe\u65f6\u65e0\u6cd5\u81ea\u52a8\u9000\u51fa\u7684bug\n- \u5176\u4ed6\u7a33\u5b9a\u6027\u4fee\u590d\n\n## 2.006\n- \u589e\u52a0`make_archive`, \u4e0b\u8f7d\u5b8c\u6210\u540e\u751f\u6210zip\u538b\u7f29\u5305\u5e76\u5220\u9664\u4e0b\u8f7d\u76ee\u5f55\n- \u5b8c\u5584reload\u673a\u5236\n- \u68c0\u6d4bIP\u662f\u5426\u88abban\u5e76\u81ea\u52a8\u66f4\u6362\u4ee3\u7406IP\n\n## 2.005\n- \u589e\u52a0`rpc_secret`\n- `i18n/zh_cn`\u66f4\u540d\u4e3a`i18n/zh_hans`\n\n## 2.004\n- \u652f\u6301Python3\n\n## 2.003\n- \u8bfb\u53d6 .ehentai.cookie\n- \u4ea4\u4e92\u6a21\u5f0f\u4e0d\u4fdd\u5b58\u4efb\u52a1\n- \u6dfb\u52a0 `--rename-ori` \u53c2\u6570\u548c\u914d\u7f6e\n- \u5982\u679c\u7528\u6237\u914d\u7f6e\u6709\u95ee\u9898\uff0c\u4ece\u5185\u7f6e\u914d\u7f6e\u8bfb\u53d6\u9ed8\u8ba4\u503c\n- \u5176\u4ed6\u66f4\u65b0\n\n## 2.002\n- \u652f\u6301`glype`\u4ee3\u7406\u7c7b\u578b\n\n## 2.001\n- \u521d\u59cb\u53d1\u5e03", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://yooooo.us/2013/xehentai", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "xeHentai", "package_url": "https://pypi.org/project/xeHentai/", "platform": "", "project_url": "https://pypi.org/project/xeHentai/", "project_urls": { "Homepage": "https://yooooo.us/2013/xehentai" }, "release_url": "https://pypi.org/project/xeHentai/2.2/", "requires_dist": null, "requires_python": "", "summary": "xeHentai Downloader", "version": "2.2" }, "last_serial": 5831124, "releases": { "2.2": [ { "comment_text": "", "digests": { "md5": "c71075618858c1b75ac2e0c17d076729", "sha256": "fe7699326139daebe5aa50bf0478a8bb437b96706c2f6564e1f8f1ecd5294190" }, "downloads": -1, "filename": "xeHentai-2.2.tar.gz", "has_sig": false, "md5_digest": "c71075618858c1b75ac2e0c17d076729", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45283, "upload_time": "2019-09-15T08:44:39", "url": "https://files.pythonhosted.org/packages/d3/e6/9602eb226a38b853264d7a0fc39a07f1a58b826d93c203fb68b0b1be3ea5/xeHentai-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c71075618858c1b75ac2e0c17d076729", "sha256": "fe7699326139daebe5aa50bf0478a8bb437b96706c2f6564e1f8f1ecd5294190" }, "downloads": -1, "filename": "xeHentai-2.2.tar.gz", "has_sig": false, "md5_digest": "c71075618858c1b75ac2e0c17d076729", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45283, "upload_time": "2019-09-15T08:44:39", "url": "https://files.pythonhosted.org/packages/d3/e6/9602eb226a38b853264d7a0fc39a07f1a58b826d93c203fb68b0b1be3ea5/xeHentai-2.2.tar.gz" } ] }