Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nightmare node example

const Nightmare = require('nightmare')const nightmare = Nightmare({ show: true }) nightmare  .goto('https://duckduckgo.com')  .type('#search_form_input_homepage', 'github nightmare')  .click('#search_button_homepage')  .wait('#r1-0 a.result__a')  .evaluate(() => document.querySelector('#r1-0 a.result__a').href)  .end()  .then(console.log)  .catch(error => {    console.error('Search failed:', error)  })
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #nightmare #node
ADD COMMENT
Topic
Name
6+8 =