苹果cmsV10接口爬虫 支持commonjs
import Collecter from "maccms-api-collect";
(async () => {
const collecter = new Collecter(
// "https://cj.lziapi.com/api.php/provide/vod/at/xml/", // 苹果cmsv10 xml采集地址
"https://cj.lziapi.com/api.php/provide/vod/", // 苹果cmsv10 json采集地址
{ h: 24 } // 采集最近小时
);
const types = await collecter.types(); // 采集视频类型
console.log(types);
let videos = null;
// 循环查询所有页数据
while ((videos = await collecter.nextPage())) {
console.log(videos);
}
})();