Open sgelbart opened 2 years ago
Sample html
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1">
<title>reCAPTCHA demo: Simple page</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<style>
.form_container {
padding-top: 2rem;
width: 304px;
text-align: center;
margin: auto;
}
.form_container input[type='submit'] {
padding: 0.75rem;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="form_container">
<form action="/recaptcha/recaptcha.aspx" method="POST">
<div class="g-recaptcha" data-sitekey="6Ldu8X0UAAAAAMhAy59I5kHOnLqZ6xlCipROyOZE"></div>
<br/>
<input type="submit" value="Submit">
<input type='hidden' id='source_uri' name='source_uri' value='L2RvY2tldHMvR2V0Q2FzZUluZm9ybWF0aW9uLmFzcHg/ZGI9dHVsc2EmbnVtYmVyPVRSLTIwMjItNzQzOQ=='>
</script>
</form>
</div>
</body>
</html>
Given that too many requests have been made to oscn and there is a captcha shown or invalid content shown When the scraper gets the html of the page raise a custom exception (so that the html is not saved or parsed).
You will need to update this project as well as the oscn project to complete end to end testing.
End to end testing:
Notes: