DramaHarvester/tests/api/redisAPITest.ts

18 lines
514 B
TypeScript
Raw Normal View History

2024-03-19 05:16:12 +00:00
import { CommentFetcher } from "../../src/rdrama/services/CommentFetcher";
import SessionManager from "../../src/rdrama/session/SessionManager"
main();
async function main(): Promise<void> {
console.log('1')
const axiosSession = SessionManager.getInstance()
console.log('2')
let maxPages = 5
for (let page = 1; page <= maxPages; page++) {
const newComments = await CommentFetcher.fetchComments(page)
}
console.log('3')
await axiosSession.shutdown()
console.log('4')
}