(url)
| 13 | } |
| 14 | |
| 15 | const extractFromUrl = async (url) => { |
| 16 | try { |
| 17 | console.time('extraction') |
| 18 | const art = await extract(url) |
| 19 | console.log(art) |
| 20 | if (art) { |
| 21 | const slug = slugify(art.title) |
| 22 | writeFileSync(`evaluation/${slug}.html`, art.content, 'utf8') |
| 23 | } |
| 24 | console.timeEnd('extraction') |
| 25 | } catch (err) { |
| 26 | console.trace(err) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | const extractFromFile = async (fpath) => { |
| 31 | try { |