Mam w html taki kod:
<script src='https://www.google.com/recaptcha/api.js?render=6LdhylYaAAAAAH9jWq2d2pT18NiYRa4Qgv0jXBeX'></script>
<script>
grecaptcha.ready(function() {
grecaptcha.execute('6LdhylYaAAAAAH9jWq2d2pT18NiYRa4Qgv0jXBeX', {action: 'contact'})
.then(function(token) {
// Verify the token on the server.
document.getElementById("reCaptcha").value=token;
});
});
</script>
<input type="hidden" name="reCaptcha" value="" id="reCaptcha"/>
</form>
Jak uruchomić i zapisać do zmiennej wynik tych skryptów? Może selenium lub mechanize?