D
D
dmitred2018-04-14 14:38:23
reCAPTCHA
dmitred, 2018-04-14 14:38:23

PhantomJS not displaying ifame google recapcha 2.0, what are the solutions?

Hello colleagues!
Faced with an unsolvable problem for me, maybe someone knows the solution.
I would be grateful for tips!
The essence of the task is this: There is a page with a demo of recaptcha https://www.google.com/recaptcha/api2/demo, if you open it through a phantom, then just a black screen is recorded in the screenshot.jpeg file. Phantomjs doesn't see the iframe. And you need the phantom to load the iframe.
Tried --web-security=no (when running the script, didn't help)
Below is the code I'm using:

var webPage = require('webpage');
var page = webPage.create();

page.settings.userAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/41.0.2272.101 Safari/537.36",


page.open('https://www.google.com/recaptcha/api2/demo', function (status) {


        window.setTimeout( function() {
            page.render('screenshot.jpeg');
            phantom.exit();
        }, 2500);

 
});

PS I would be grateful for any advice towards a solution!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sundukov, 2018-04-19
@alekciy

How to execute a script in all iframes in PhantomJS?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question