lapwinglabs / x-ray-phantom

phantom driver for x-ray.
112 stars 30 forks source link

Unexpected end of JSON input #27

Open BjoernRave opened 6 years ago

BjoernRave commented 6 years ago

Hey, I wanted to use this package and I dont get it to work, it always prints out:


internal/modules/cjs/loader.js:700
    throw err;
    ^

SyntaxError: C:\Users\bjoer\Desktop\webscraper\results.json: Unexpected end of JSON input

My code looks like this:

const xray = new Xray()
  .driver(
    phantom({
      XSSAuditingEnabled: true,
      loadImages: false,
      webSecurity: false,
      weak: false
    })
  )
  .concurrency(3)
  .throttle(3, 500);

xray("http://www.google.de", "p", [
    {
      name: ""
    }
  ]).write("results.json");

It also says when installing, that Phantom v1 is no longer supported. Is that the reason?