IT Events crawler

中国 IT 活动日历

核心创意源自 @too一个想法,核心代码源自 @TechQuery《NodeJS 网页爬虫一小时实战》课程

NPM Dependency CI & CD

NPM

基本用法

活动列表

命令行

npm install @fcc-cdc/it-events -g

# 以间隔 0.5 秒的速度把所有活动下载到桌面的一个文件
it-events list -i 0.5 1> ~/Desktop/it-events.yml

Node.JS 模块

import updateEvents, { descendDate } from '@fcc-cdc/it-events';

(async () => {
const list = [];

for await (let item of updateEvents(list, 0.5)) list.push(item);

console.log([...new Set(list)].sort(descendDate));
})();

议程列表

命令行

# 议程在首页
it-events agenda https://www.bagevent.com/event/8199059

# 议程在内页
it-events agenda https://www.bagevent.com/event/6840909/p/430761

Node.js 模块

import { BagEventAgenda } from 'it-events';

// 议程在首页
new BagEventAgenda().saveList('https://www.bagevent.com/event/8199059');

// 议程在内页
new BagEventAgenda().saveList(
'https://www.bagevent.com/event/6840909/p/430761'
);

Generated using TypeDoc