From ca1d9e75012e766d45b2944f4441cc6bb0da1996 Mon Sep 17 00:00:00 2001 From: Nigel Nindo Date: Tue, 17 Oct 2023 07:24:49 +0300 Subject: [PATCH] Commit work --- src/testbed/captcha_testbed.ts | 33 +++++++++++++++++++++++++++++++++ src/testbed/testbed.ts | 1 - src/testbed/testbed_2.ts | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/testbed/captcha_testbed.ts diff --git a/src/testbed/captcha_testbed.ts b/src/testbed/captcha_testbed.ts new file mode 100644 index 0000000..eb77863 --- /dev/null +++ b/src/testbed/captcha_testbed.ts @@ -0,0 +1,33 @@ +import { setTimeout } from "timers/promises"; + +import * as puppeteer from 'puppeteer'; +//const puppeteer = require('puppeteer-extra'); + +//const stealthPlugin = require('puppeteer-extra-plugin-stealth'); +//puppeteer.use(stealthPlugin()); + + +class CaptchaTestBed { + private url: string; + + constructor() { + this.url = "https://app.zenrows.com/register"; + } + + public async run() { + try { + const browser = await puppeteer.launch({headless: false}); + const page = await browser.newPage(); + await page.goto(this.url); + await setTimeout(30000); + const html = await page.content(); + console.log("Page content:") + console.log(html); + } catch (e: any) { + console.error(e.message); + } + } +} + +const captchaTestBed = new CaptchaTestBed(); +captchaTestBed.run(); \ No newline at end of file diff --git a/src/testbed/testbed.ts b/src/testbed/testbed.ts index e55a5de..c4f60eb 100644 --- a/src/testbed/testbed.ts +++ b/src/testbed/testbed.ts @@ -6,4 +6,3 @@ betikaProvider.getConfig(); const betikaScrapper = new BetikaScrapper(); betikaScrapper.fetchData(); - diff --git a/src/testbed/testbed_2.ts b/src/testbed/testbed_2.ts index a3da4ac..ab99669 100644 --- a/src/testbed/testbed_2.ts +++ b/src/testbed/testbed_2.ts @@ -1,4 +1,4 @@ import { BetikaParser } from "../core/parsers/betika"; const betikaParser = new BetikaParser() -betikaParser.subscribeToChannels(); \ No newline at end of file +betikaParser.subscribeToChannels();