Skip to content

Commit

Permalink
feat: support JavDbUtil in cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
akynazh committed Feb 3, 2024
1 parent 19f7264 commit dd84732
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pip install jvav -U
# A sample for DmmUtil
import jvav

util = jvav.DmmUtil(proxy_addr='http://127.0.0.1:7890')
util = jvav.DmmUtil()
util.get_nice_avs_by_star_name('小倉由菜')
util.get_score_by_id('cawd-441')
util.get_all_top_stars()
Expand All @@ -36,24 +36,31 @@ util.get_all_top_stars()

```shell
$ jvav -h
usage: cmd.py [-h] [-v] [-av1 AV1] [-av2 AV2] [-nc] [-uc] [-sr SR] [-srn SRN]
[-tg TG] [-pv1 PV1] [-pv2 PV2] [-tp] [-p PROXY]
usage: cmd.py [-h] [-v] [-av1 AV1] [-av2 AV2] [-av3 AV3] [-nc] [-uc] [-sr SR]
[-srn SRN] [-tg TG] [-pv1 PV1] [-pv2 PV2] [-tp] [-p PROXY]

optional arguments:
-h, --help show this help message and exit
-v, --version View the version number
-av1 AV1 Followed by a code, search for the code on JavBus
-av2 AV2 Followed by a code, search for the code on Sukebei
-nc Filter out high-definition torrents with subtitles
-uc Filter out uncensored torrents
-sr SR Followed by an actress name, get a list of high-rated codes based on the actress name
-srn SRN Followed by an actress name, get a list of the latest codes based on the actress name
-tg TG Followed by a keyword, search for codes based on the keyword
-pv1 PV1 Followed by a code, get the preview video corresponding to the code from DMM
-pv2 PV2 Followed by a code, get the preview video corresponding to the code from Avgle
-v, --version Check version
-av1 AV1 Followed by a code, search this code on JavBus
-av2 AV2 Followed by a code, search this code on Sukebei
-av3 AV3 Followed by a code, search this code on JavDb
-nc Filter out high-definition subtitles magnet links
-uc Filter out uncoded magnet links
-sr SR Followed by an actress name, get a list of high-rated
codes based on the actress name
-srn SRN Followed by an actress name, get a list of the most
recent codes based on the actress name
-tg TG Followed by a keyword, search for codes based on the
keyword
-pv1 PV1 Followed by a code, get the corresponding preview
video of the code on DMM
-pv2 PV2 Follow a code, get the corresponding preview video of
the code on Avgle
-tp Get the top 25 ranking of DMM actresses
-p PROXY, --proxy PROXY
Followed by the proxy server address, by default reads the value of the http_proxy environment variable.
Followed by a proxy server address (by default reads
the value of the environment variable http_proxy)
```

## DEV
Expand Down Expand Up @@ -82,5 +89,5 @@ The following are some functions to be implemented, and I look forward to your c
- [ ] cache the successful query results locally
- [x] support javdb.com (Thanks: [@Steven-Fake](https://github.com/Steven-Fake))
- [ ] support db.msin.jp
- [ ] support JavDbUtil in cmd
- [x] support JavDbUtil in cmd
- [ ] support SgpUtil in cmd
2 changes: 1 addition & 1 deletion jvav/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
SgpUtil,
)

__version__ = "1.6.1"
__version__ = "1.6.2"

VERSION = __version__

Expand Down
12 changes: 12 additions & 0 deletions jvav/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ def __init__(self):
default="",
help="Followed by a code, search this code on Sukebei",
)
parser.add_argument(
"-av3",
type=str,
default="",
help="Followed by a code, search this code on JavDb",
)
parser.add_argument(
"-nc",
action="store_true",
Expand Down Expand Up @@ -151,6 +157,12 @@ def exec(self):
id=args.av2, is_nice=args.nc, is_uncensored=args.uc
)
)
elif args.av3 != "":
self.handle_code(
*jvav.JavDbUtil(proxy_addr=args.proxy).get_av_by_id(
id=args.av3, is_nice=args.nc, is_uncensored=args.uc
)
)
elif args.tp:
self.handle_code(*jvav.DmmUtil(proxy_addr=args.proxy).get_top_stars(1))
elif args.sr != "" or args.srn != "":
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="Jvav",
version="1.6.1",
version="1.6.2",
description="Useful tools for Jav.",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit dd84732

Please sign in to comment.