Download the PHP package shinoshi/nightmare-php without Composer
On this page you can find all versions of the php package shinoshi/nightmare-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package nightmare-php
NightmarePHP
PHP wrapper for NightmareJS
Usage
Raw option (recommended):
use dioro\nightmarePHP\nightmarePHP;
$nightmare = new nightmarePHP();
$nightmare->rawInput("
const Nightmare = require(\"nightmare\");
const nightmare = Nightmare({ show: false });
nightmare
.goto('https://www.reddit.com/r/news/')
.wait('#siteTable > div:first-child .title > a')
.evaluate(() => document.querySelector(\"#siteTable > div:first-child .title > a\").textContent)
.end()
.then(console.log)
.catch((error) => {console.error('Search failed:', error);});")
->run();
var_dump($nightmare->getResult()); #returns latest title of the /r/news subreddit
Predefined method option:
use dioro\nightmarePHP\nightmarePHP;
$nightmare = new nightmarePHP();
$nightmare->config("show: false");
$nightmare
->_goto('https://www.reddit.com/r/news/')
->wait('#siteTable > div:first-child .title > a')
->evaluate("() => document.querySelector(\"#siteTable > div:first-child .title > a\").textContent")
->end()
->then("console.log")
->_catch("(error) => {console.error('Search failed:', error);}")
->run();
var_dump($nightmare->getResult()); #returns latest title of the /r/news subreddit
Predefined method option may not include all up to date options that NightmareJS offers to which the documentation can be found their official github repo
All versions of nightmare-php with dependencies
PHP Build Version
Package Version
No informations.
The package shinoshi/nightmare-php contains the following files
Loading the files please wait ....