[NightMare.js] How to get cookies and url together?

Write a small parser.
In one place there is a need keep the current URL and COOKIES.
Tried and true, as you can see below and a little different.
In each case .only then transmitted .the url either .cookies.get.
How to solve?
nightmare
.goto
.click
 // ... 
.cookies.get()
.url()
.end()
.then(console.log)
 .catch(console.log)
March 23rd 20 at 19:10
1 answer
March 23rd 20 at 19:12
Nightmare can be used with Async/await:
const n = nightmare.goto(...)
const cookies = await n.cookies.get()
const url = await n.url()
await n.end()
console.log(cookies, url)

Find more questions by tags ParsingJavaScript