Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Updated unit tests to support new apify-client's baseUrl setting, bumped package.json version
Jan Curnb0fe81c33de9
diff --git a/package.json b/package.jsonindex 414dad372..7665c7cc7 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "apifier",- "version": "0.0.40",+ "version": "0.0.41","description": "Apifier runtime for JavaScript","main": "build/index.js","keywords": [diff --git a/test/utils.js b/test/utils.jsindex 9e8fd9d89..957eb65cc 100644--- a/test/utils.js+++ b/test/utils.js@@ -36,7 +36,8 @@ describe('Apifier.xxxPromisesDependency()', () => {describe('utils.newClient', () => {it('reads environment variables correctly', () => {- process.env.APIFY_API_BASE_URL = 'http://www.example.com:1234/path/';+ // TODO: after new version of client is deployed, add '/' at the end of this path, client should remove it!+ process.env.APIFY_API_BASE_URL = 'http://www.example.com:1234/path';process.env.APIFY_USER_ID = 'userId';process.env.APIFY_TOKEN = 'token';const client = utils.newClient();@@ -44,12 +45,8 @@ describe('utils.newClient', () => {expect(client.constructor.name).to.eql('ApifyClient');const opts = client.getOptions();- // TODO: eventually this should be only:- // expect(opts.baseUrl).to.eql('http://www.example.com:1234/path/');- expect(opts.host).to.eql('www.example.com');- expect(opts.port).to.eql(1234);- expect(opts.basePath).to.eql('/path');expect(opts.userId).to.eql('userId');expect(opts.token).to.eql('token');+ expect(opts.baseUrl).to.eql('http://www.example.com:1234/path');});});