github apify/got-scraping v4.0.0

latest releases: v4.0.6, v4.0.6-beta.0, v4.0.5...
8 months ago

The module is now ESM only

This means you have to import it by using an import expression, or the import() method. You can do so by either migrating your project to ESM, or importing got-scraping in an async context

-const { gotScraping } = require('got-scraping');
+import { gotScraping } from 'got-scraping';

If you cannot migrate to ESM, here's an example of how to import it in an async context:

let gotScraping;

async function fetchWithGotScraping(url) {
    gotScraping ??= (await import('got-scraping')).gotScraping;

    return gotScraping.get(url);
}

What's Changed

  • feat: add export of hooks and TransformHeadersAgent by @foxt451 in #102
  • feat: ESM migration of got-scraping by @vladfrangu in #109
  • feat: add Cloudflare blocking benchmarking by @barjin in #114

New Contributors

Full Changelog: v3.2.15...v4.0.0

Don't miss a new got-scraping release

NewReleases is sending notifications on new releases.