/ clis / douban / movie-hot.js
movie-hot.js
 1  import { cli, Strategy } from '@jackwener/opencli/registry';
 2  import { loadDoubanMovieHot } from './utils.js';
 3  cli({
 4      site: 'douban',
 5      name: 'movie-hot',
 6      description: '豆瓣电影热门榜单',
 7      domain: 'movie.douban.com',
 8      strategy: Strategy.COOKIE,
 9      args: [
10          { name: 'limit', type: 'int', default: 20, help: '返回的电影数量' },
11      ],
12      columns: ['rank', 'title', 'rating', 'quote', 'director', 'year', 'region', 'url'],
13      func: async (page, args) => loadDoubanMovieHot(page, Number(args.limit) || 20),
14  });