我正在做一个reddit账号自动生成器。我想问一下如何使用2captcha的API来绕过captcha。因为在输入用户名和密码后,新的captcha框会出现,我已经在2captcha页面,youtube上的视频教程中进行了研究,但仍然没有找到方法。谢谢大家,祝你们有美好的一天!
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.proxy import *
from selenium.webdriver.common.by import By
from time import sleep
import time
import openpyxl
import requests
import pandas as pd
from twocaptcha import TwoCaptcha
solver = TwoCaptcha('YOUR_API_KEY')
# Load the Excel file
...
# Loop through the rows of the DataFrame
...
# Get the latest IP address from the proxy service
...
# Update the capabilities object to use the new proxy
...
# Create a new instance of the webdriver with the updated capabilities
# Use selenium to signup with the username and password
result = solver.recaptcha(sitekey='6LeTnxkTAAAAAN9QEuDZRpn90WwKk_R1TRW_g-JC',
url='https://www.reddit.com/account/register/')
1条答案
按热度按时间ars1skjm1#
查看TwoCaptcha文档!