How to Bypass Captcha Automatic Login with Nodejs Playwright 2Captcha

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • bypass-captcha

    Use Nodejs + Playwright + 2Captcha, bypass captcha and automatically log in to bilibili.com

  • overlord

    Overlord是哔哩哔哩基于Go语言编写的memcache和redis&cluster的代理及集群管理功能,致力于提供自动化高可用的缓存服务解决方案。

    const { chromium } = require("playwright"); (async () => { // Select the Chrome browser, set headless: false to see the browser interface const browser = await chromium.launch({ headless: false, }); const page = await browser.newPage(); // open bilibili.com await page.goto("https://www.bilibili.com/"); const [response] = await Promise.all([ // request verification code interface page.waitForResponse( (response) => response.url().includes("/x/passport-login/captcha") && response.status() === 200 ), // Click the login button at the top page.click(".header-login-entry"), ]); // Get the interface response information const responseJson = await response.body(); // Parse out gt and challenge const json = JSON.parse(responseJson); const gt = json.data.geetest.gt; const challenge = json.data.geetest.challenge; console.log("get gt", gt, "challenge", challenge); // Pause for 5 seconds to prevent the browser from closing too fast to see the effect sleep(5000); // close the browser await browser.close(); })(); /** * Simulate the sleep function, delay for a number of milliseconds */ function sleep(delay) { var start = new Date().getTime(); while (new Date().getTime() < start + delay); }

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

  • node

    Node.js JavaScript runtime ✨🐢🚀✨

    Make sure that Nodejs has been installed locally on your computer

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts