G
G
grenline1231232021-03-18 22:50:24
PHP
grenline123123, 2021-03-18 22:50:24

Phantomjs + php endless loading?

For parsing, I had to use a headless browser, I use a bunch of php + phantomjs, but I ran into a problem, if I just output console.log, then phantomjs works fine, but as soon as I use a similar code

// Инициализируем модуль по работе с закладкой браузера
var webPage = require('webpage');
// Создаем пустую закладку
var page = webPage.create();
// Открываем в закладке сайт: https://www.google.com/
page.open('https://www.google.com/', function(status)) {

// Выводим в консоль статус получения страницы с сайта ("success" при успехе и "fail")
console.log('Status: ' + status);
// Завершение работы программы PhantomJS
phantom.exit();
});


Loading is endless

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question