2017-11-16 3 views

答えて

0

これは動作します:

const Nightmare = require('nightmare') 
const nightmare = Nightmare() 

async function example() { 
    const call = nightmare 
     .goto('http://cnn.com') 

    const title = await call 
     .evaluate(() => document.title) 

    const cookies = await call 
     .cookies.get() 

    await call.end() 
    return {title, cookies} 
} 
関連する問題