API_KEY為2captcha的API
import requests
creat_task_url = 'https://2captcha.com/in.php?key=API_KEY&method=userrecaptcha&googlekey=WEBSITE_KEY&pageurl=URL'
id = ''
res = requests.get(creat_task_url)
if res.status_code == 200:
id = str(re.findall('\|(\d*)', res.text)[0])
time.sleep(20)
code_res = requests.get(f'https://2captcha.com/res.php?key=API_KEY&action=get&id={id}')
print(code_res.text)