my-crawler/src/index.ts

37 lines
807 B
TypeScript

import { fetchData, queryListData } from "./link";
export type FetchType = {
typeId: string;
url: string;
name?: string;
}
const fetchList = [
{
name: 'AI写作工具',
typeId: '6790aae23de33b392c0330b2',
url: 'https://ai-bot.cn/favorites/ai-writing-tools/'
},
{
name: 'AI图像网站',
typeId: '67908fc33de33b392c0330af',
url: 'https://ai-bot.cn/favorites/best-ai-image-tools/'
},
{
name: 'AI视频网站',
typeId: '67b6f0b7b139d1d6aa14cd06',
url: 'https://ai-bot.cn/favorites/ai-video-tools/'
},
{
name: 'AI音频网站',
typeId: '6791a98fc058e55ed0a094ca',
url: 'https://ai-bot.cn/favorites/ai-audio-tools/'
},
]
function main() {
console.log("Hello, this is the main function!");
queryListData(fetchList)
// test()
}
main();