Skip to content

v7.2.17

Choose a tag to compare

@ndaidong ndaidong released this 01 Jul 03:49
· 108 commits to main since this release
3e47e87
  • Merge pr #350 by @LarchLiu
  • Add agent to fetchOptions
  • Update CI to test with Node 20
  • Update dependencies
  • Update README

Example article extraction via proxy server with agent

import { extract } from '@extractus/article-extractor'

import { HttpsProxyAgent } from 'https-proxy-agent'

const proxy = 'http://abc:RaNdoMpasswORd_country-France@proxy.packetstream.io:31113'

const url = 'https://www.cnbc.com/2022/09/21/what-another-major-rate-hike-by-the-federal-reserve-means-to-you.html'

const article = await extract(url, {}, {
  agent: new HttpsProxyAgent(proxy),
})
console.log('Run article-extractor with proxy:', proxy)
console.log(article)