Anuj-Panthri commited on
Commit
cd531a5
·
1 Parent(s): c685998
Files changed (1) hide show
  1. index.js +2 -1
index.js CHANGED
@@ -140,12 +140,13 @@ app.get("/testhtml", async (req, res) => {
140
  }));
141
  })
142
  app.get("/testscreenshot", async (req, res) => {
143
- const image = await getScreenshot(url);
144
  // convert buffer to base64 string
145
  const base64Image = await image.toString('base64');
146
 
147
  res.type("json");
148
  return res.send(JSON.stringify({
 
149
  "screenshot": "data:image/png;base64," + base64Image
150
  }));
151
  })
 
140
  }));
141
  })
142
  app.get("/testscreenshot", async (req, res) => {
143
+ const {html,image} = await getScreenshot(url);
144
  // convert buffer to base64 string
145
  const base64Image = await image.toString('base64');
146
 
147
  res.type("json");
148
  return res.send(JSON.stringify({
149
+ // "html":html,
150
  "screenshot": "data:image/png;base64," + base64Image
151
  }));
152
  })