Update index.js
Browse files
index.js
CHANGED
|
@@ -481,6 +481,11 @@ const app = express()
|
|
| 481 |
method: "GET",
|
| 482 |
example: `${host}/googleSearch?q=`
|
| 483 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
{
|
| 485 |
title: "Instagram Downloader",
|
| 486 |
method: "GET",
|
|
@@ -826,6 +831,17 @@ return res.json({ message: e.message });
|
|
| 826 |
return res.json({ message: e.message });
|
| 827 |
}
|
| 828 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 829 |
.get('/mega', async (req, res) => {
|
| 830 |
try {
|
| 831 |
let { url } = req.query;
|
|
|
|
| 481 |
method: "GET",
|
| 482 |
example: `${host}/googleSearch?q=`
|
| 483 |
},
|
| 484 |
+
{
|
| 485 |
+
title: "Google Search Image",
|
| 486 |
+
method: "GET",
|
| 487 |
+
example: `${host}/gimage?q=`
|
| 488 |
+
},
|
| 489 |
{
|
| 490 |
title: "Instagram Downloader",
|
| 491 |
method: "GET",
|
|
|
|
| 831 |
return res.json({ message: e.message });
|
| 832 |
}
|
| 833 |
})
|
| 834 |
+
.get('/gimage', async (req, res) => {
|
| 835 |
+
try {
|
| 836 |
+
let q = req.query.q || req.query.query;
|
| 837 |
+
if (!q) return res.json({ message: 'Input parameter q' });
|
| 838 |
+
let get = await (require("async-g-i-s"))(q)
|
| 839 |
+
return res.json(get)
|
| 840 |
+
} catch (e) {
|
| 841 |
+
console.log(e);
|
| 842 |
+
return res.json({ message: e.message });
|
| 843 |
+
}
|
| 844 |
+
})
|
| 845 |
.get('/mega', async (req, res) => {
|
| 846 |
try {
|
| 847 |
let { url } = req.query;
|