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
chore: deprecate utils.waitForRunToFinish
Ondra Urbanff0ff94aee70
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 06319b384..c70ecd246 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,3 +1,7 @@+NEXT+====================+- **DEPRECATED:** `utils.waitForRunToFinish` please use `apify-client` and its `waitForFinish` functions. Sorry, forgot to deprecate this with v1 release.+1.1.1 / 2021/03/23====================- Fix `SessionPoolOptions` not being correctly used in `BrowserCrawler`.diff --git a/src/utils.js b/src/utils.jsindex c35bf935b..3c5113f1a 100644--- a/src/utils.js+++ b/src/utils.js@@ -679,6 +679,9 @@ export const parseContentTypeFromResponse = (response) => {* @memberOf utils* @name waitForRunToFinish* @function+ * @deprecated+ * Please use the 'waitForFinish' functions of 'apify-client'.+ * @ignore*/export const waitForRunToFinish = async (options) => {ow(options, ow.object.exactShape({@@ -707,7 +710,7 @@ export const waitForRunToFinish = async (options) => {? Math.round(waitSecs - (Date.now() - startedAt) / 1000): 999999;- run = await apifyClient.run(runId, actorId).waitForFinish({ waitSecs: waitForFinish }); // TODO waitForFinish+ run = await apifyClient.run(runId, actorId).waitForFinish({ waitSecs: waitForFinish });// It might take some time for database replicas to get up-to-date,// so getRun() might return null. Wait a little bit and try it again.