From f45886bc9f1d8914f173aedbdfd3ffcc5282c1f7 Mon Sep 17 00:00:00 2001 From: oscarz Date: Mon, 2 Jun 2025 09:25:25 +0800 Subject: [PATCH] modify scripts --- javdb/src/fetch.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/javdb/src/fetch.py b/javdb/src/fetch.py index 2364947..a66e0d6 100644 --- a/javdb/src/fetch.py +++ b/javdb/src/fetch.py @@ -381,8 +381,8 @@ function_map = { "makers": fetch_movies_by_maker, "series" : fetch_movies_by_series, "pub" : fetch_movies_by_publishers, - "movies" : fetch_movies_detail, "actors" : fetch_performers_detail, + "movies" : fetch_movies_detail, } # 主函数 @@ -443,12 +443,14 @@ if __name__ == "__main__": usage_examples = textwrap.dedent(''' 示例用法: - python3 ./fetch # 遍历新增的所有记录 - python3 ./fetch --scan_mode=0 # 遍历新增的 uncensored 记录(无码片) - python3 ./fetch --scan_mode=1 # 遍历新增的 非uncensored 记录(有码片) - python3 ./fetch --update=4 # 遍历全量的记录 - python3 ./fetch --update=4 --scan_mode=0 # 遍历全量的 uncensored 记录(无码片) - python3 ./fetch --update=4 --scan_mode=1 # 遍历全量的 非uncensored 记录(有码片) + python3 ./fetch.py # 遍历新增的所有记录 + python3 ./fetch.py --scan_mode=1 # 遍历新增的 uncensored 记录(无码片) + python3 ./fetch.py --scan_mode=0 # 遍历新增的 非uncensored 记录(有码片) + python3 ./fetch.py --scan_mode=2 # 遍历所有新增 + python3 ./fetch.py --update=4 # 遍历全量的记录 + python3 ./fetch.py --update=4 --scan_mode=1 # 遍历全量的 uncensored 记录(无码片) + python3 ./fetch.py --update=4 --scan_mode=0 # 遍历全量的 非uncensored 记录(有码片) + python3 ./fetch.py --update=4 --scan_mode=2 # 遍历全量记录 ''') parser = argparse.ArgumentParser( @@ -458,7 +460,7 @@ if __name__ == "__main__": #parser = argparse.ArgumentParser(description='fetch javdb data.') parser.add_argument("--cmd", type=str, help=f"Comma-separated list of function shortcuts: {keys_str}") parser.add_argument('--update', type=int, choices=[0, 1, 2, 3, 4], default=0, help='0-只遍历is_full_data=0(默认), 1-只遍历is_full_data=1, 2-遍历is_full_data<=1, 3-只遍历is_full_data>1(异常数据), 4-遍历所有') - parser.add_argument('--scan_mode', type=int, choices=[0, 1, 2], default=2, help='0-只遍历所有 uncensored 的 makers/series/actors/movies, 1-与前者相反, 2-全量(默认)') + parser.add_argument('--scan_mode', type=int, choices=[0, 1, 2], default=1, help='1-只遍历所有 uncensored 的 makers/series/actors/movies(默认), 0-与前者相反, 2-全量') parser.add_argument('--skip_local', action='store_true', help='如果本地缓存了页面,则跳过数据库操作') parser.add_argument('--debug', action='store_true', help='Enable debug mode (limit records)') args = parser.parse_args()