diff --git a/package.json b/package.json index f73349f..1b03663 100644 --- a/package.json +++ b/package.json @@ -100,9 +100,9 @@ "@keyvhq/multi": "~2.1.5", "@keyvhq/redis": "~2.1.5", "@kikobeats/time-span": "~1.0.5", - "@microlink/mql": "~0.13.6", + "@microlink/mql": "~0.13.7", "@microlink/ping-url": "~1.4.15", - "@microlink/ua": "~1.2.4", + "@microlink/ua": "~1.2.5", "async-memoize-one": "~1.1.8", "browserless": "~10.6.0", "cacheable-lookup": "~6.1.0", @@ -129,9 +129,9 @@ "p-cancelable": "2.1.1", "p-reflect": "~2.1.0", "p-timeout": "~4.1.0", - "puppeteer": "~23.4.0", + "puppeteer": "~23.4.1", "rate-limiter-flexible": "~5.0.3", - "router-http": "~1.0.8", + "router-http": "~1.0.10", "send-http": "~1.0.6", "serve-static": "~1.16.2", "srcset": "~4.0.0", diff --git a/src/providers/telegram.js b/src/providers/telegram.js index 93bafac..5b88709 100644 --- a/src/providers/telegram.js +++ b/src/providers/telegram.js @@ -6,7 +6,7 @@ const cheerio = require('cheerio') const getHTML = require('../util/html-get') module.exports = PCancelable.fn(async function telegram ({ input }, onCancel) { - const promise = getHTML(`https://t.me/${input}`, { prerender: false }) + const promise = getHTML(`https://t.me/${input}`) const { html } = await promise onCancel(() => promise.onCancel()) const $ = cheerio.load(html) diff --git a/src/util/html-get.js b/src/util/html-get.js index a9bbd78..3890111 100644 --- a/src/util/html-get.js +++ b/src/util/html-get.js @@ -12,10 +12,10 @@ module.exports = async (url, { puppeteerOpts, ...opts } = {}) => { const browserContext = await browser.createContext() const result = await getHTML(url, { + prerender: false, ...opts, getBrowserless: () => browserContext, puppeteerOpts: { - abortTypes: ['image', 'stylesheet', 'font', 'script'], timeout: AVATAR_TIMEOUT, ...puppeteerOpts },