This function verifies the reCAPTCHA response.
(response)
| 137 | |
| 138 | # Public demo control |
| 139 | def verify_recaptcha(response): |
| 140 | """ |
| 141 | This function verifies the reCAPTCHA response. |
| 142 | """ |
| 143 | recaptcha_url = "https://www.google.com/recaptcha/api/siteverify" |
| 144 | data = {"secret": server_key, "response": response} |
| 145 | result = requests.post(recaptcha_url, data=data).json() |
| 146 | return result.get("success") |
| 147 | |
| 148 | |
| 149 | def download_with_limit(url: str, save_path: str, size_limit: int) -> str: |