modify scripts

This commit is contained in:
oscarz
2025-06-02 09:25:25 +08:00
parent b985e73c32
commit f45886bc9f

View File

@ -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()