commit
This commit is contained in:
parent
be4fd23bcf
commit
0bd53741af
728 changed files with 86573 additions and 0 deletions
26
node_modules/googlethis/examples/index.js
generated
vendored
Normal file
26
node_modules/googlethis/examples/index.js
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
const google = require('../lib/google_this');
|
||||
|
||||
async function start() {
|
||||
// A simple search
|
||||
const res = await google.search('Stephen Hawking', {
|
||||
page: 0,
|
||||
safe: false,
|
||||
additional_params: {
|
||||
hl: 'en'
|
||||
}
|
||||
});
|
||||
console.info('Search Results:', res);
|
||||
|
||||
// Image Search
|
||||
const images = await google.image('The Wolf Among Us', { safe: false });
|
||||
console.info('Image Search:', images);
|
||||
|
||||
// Reverse Image Search
|
||||
const reverse = await google.search('https://i.pinimg.com/236x/92/16/d9/9216d9a222ef65eb6eabfff1970180d1.jpg', { ris: true });
|
||||
console.info('Reverse Image Search:', reverse.results);
|
||||
|
||||
const news = await google.getTopNews();
|
||||
console.info('Google Top News:', news);
|
||||
}
|
||||
|
||||
start();
|
Loading…
Add table
Add a link
Reference in a new issue