/ clis / sinablog / article.js
article.js
 1  import { cli, Strategy } from '@jackwener/opencli/registry';
 2  import { loadSinaBlogArticle } from './utils.js';
 3  cli({
 4      site: 'sinablog',
 5      name: 'article',
 6      description: '获取新浪博客单篇文章详情',
 7      domain: 'blog.sina.com.cn',
 8      strategy: Strategy.COOKIE,
 9      args: [
10          { name: 'url', required: true, positional: true, help: '文章URL(如 https://blog.sina.com.cn/s/blog_xxx.html)' },
11      ],
12      columns: ['title', 'author', 'date', 'category', 'readCount', 'commentCount'],
13      func: async (page, args) => loadSinaBlogArticle(page, args.url),
14  });