feat: Added fields to display the number of people who rated and the number of people who wanted to see the content.

This commit is contained in:
gdjdkid committed 2026-03-23 21:34:21 +08:00
1 parent 1e5a7e1c0f
commit 68eca80e5f
4 files changed
+7 -3

No files matched your search

+2
View File
@@ -37,6 +37,8 @@ export function display(info, raw = false) {
row('发行商', info.label);
row('导演', info.director);
row('系列', info.series);
row('评分', info.score ? `${info.score}${info.scoreCount ? `(${info.scoreCount}人评价)` : ''}` : '', chalk.yellow);
row('想看', info.wantCount ? `${info.wantCount} 人想看` : '', chalk.cyan);
if (info.tags.length > 0) {
const tagStr = info.tags.map(t => chalk.bgGray(` ${t} `)).join(' ');
+2
View File
@@ -279,6 +279,8 @@ function parseJavdb(html, queryId) {
tags: [],
coverUrl: $('.video-cover img').attr('src') || '',
score: $('.score .value').first().text().trim(),
scoreCount: ($('.score .value').first().text().match(/由(\d+)人/) || [])[1] || '',
wantCount: ($('.panel-block:last .is-size-7').text().match(/(\d+)人想看/) || [])[1] || '',
};
$('.movie-panel-info .panel-block').each((_, el) => {
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "javdict",
"version": "1.2.11",
"version": "1.2.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "javdict",
"version": "1.2.11",
"version": "1.2.12",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "javdict",
"version": "1.2.11",
"version": "1.2.12",
"description": "AV番号命令行查询工具",
"main": "./index.js",
"type": "module",