Files

14 lines
350 B
TypeScript
Raw Permalink Normal View History

import { ScraperService } from './src/services/scraper.js';
async function test() {
const scraper = new ScraperService();
await scraper.init();
const prices = await scraper.fetchPrices();
console.log('找到的商品:');
for (const [name, price] of prices.entries()) {
console.log(' -', name);
}
await scraper.close();
}
test();