google-img-scrap 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -10
- package/dist/core/buildGoogleDork.js +6 -14
- package/dist/core/buildGoogleDork.js.map +1 -1
- package/dist/types/config.d.ts +2 -2
- package/package.json +2 -1
- package/dist/core/cookies-cache.json +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### 1.2.1
|
|
4
|
+
|
|
5
|
+
- Fixed some bugs
|
|
6
|
+
- New structure for `filterByTitles` and `urlMatch`
|
|
7
|
+
|
|
3
8
|
### 1.2.0
|
|
4
9
|
|
|
5
10
|
- Since the last update of google we need to get the cookies from google. This is why we use `puppeteer-real-browser` in this new version to retrieve the cookie and save them in cache for faster requests after this.
|
package/README.md
CHANGED
|
@@ -186,16 +186,8 @@ console.log(test);
|
|
|
186
186
|
```js
|
|
187
187
|
const test = await GOOGLE_IMG_SCRAP({
|
|
188
188
|
search: 'cats',
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
['draw', 'white'],
|
|
192
|
-
['albino', 'white']
|
|
193
|
-
],
|
|
194
|
-
//will build something like this "(cdn and wikipedia) or (cdn and istockphoto)"
|
|
195
|
-
urlMatch: [
|
|
196
|
-
['cdn', 'wikipedia'],
|
|
197
|
-
['cdn', 'istockphoto']
|
|
198
|
-
]
|
|
189
|
+
filterByTitles: ['draw', 'albino'],
|
|
190
|
+
urlMatch: ['wikipedia', 'istockphoto']
|
|
199
191
|
});
|
|
200
192
|
|
|
201
193
|
console.log(test);
|
|
@@ -6,13 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
8
|
function filterByTitlesBuilder(config) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
FILTER_TITLE.push(`(allintitle:"${titleFilter.join(' ')}")`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return FILTER_TITLE.join(' OR ');
|
|
9
|
+
return config.filterByTitles && config.filterByTitles.length > 0
|
|
10
|
+
? '(' + config.filterByTitles.map(title => `intitle:"${title}"`).join(' OR ') + ')'
|
|
11
|
+
: '';
|
|
16
12
|
}
|
|
17
13
|
/**
|
|
18
14
|
* Show only images without some specific words
|
|
@@ -62,13 +58,9 @@ function excludeDomainsBuilder(config) {
|
|
|
62
58
|
* @returns
|
|
63
59
|
*/
|
|
64
60
|
function urlMatchBuilder(config) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
URL_MATCH.push(`(allinurl:"${urlMatch.join(' ')}")`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return URL_MATCH.join(' OR ');
|
|
61
|
+
return config.urlMatch && config.urlMatch.length > 0
|
|
62
|
+
? '(' + config.urlMatch.map(match => `inurl:"${match}"`).join(' OR ') + ')'
|
|
63
|
+
: '';
|
|
72
64
|
}
|
|
73
65
|
/**
|
|
74
66
|
* Build google dork string based on the config query
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildGoogleDork.js","sourceRoot":"","sources":["../../src/core/buildGoogleDork.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,MAAc;IAC3C,MAAM,
|
|
1
|
+
{"version":3,"file":"buildGoogleDork.js","sourceRoot":"","sources":["../../src/core/buildGoogleDork.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;QAC9D,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,IAAI,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,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG;QAC3E,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,MAAc;IACtC,OAAO;QACL,MAAM,CAAC,MAAM;QACb,eAAe,CAAC,MAAM,CAAC;QACvB,mBAAmB,CAAC,MAAM,CAAC;QAC3B,qBAAqB,CAAC,MAAM,CAAC;QAC7B,kBAAkB,CAAC,MAAM,CAAC;QAC1B,qBAAqB,CAAC,MAAM,CAAC;KAC9B;SACE,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE,CAAC;AACZ,CAAC;AAED,kBAAe,gBAAgB,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -10,12 +10,12 @@ type Config = {
|
|
|
10
10
|
LICENCE?: string;
|
|
11
11
|
EXTENSION?: string;
|
|
12
12
|
};
|
|
13
|
-
urlMatch?: string[]
|
|
13
|
+
urlMatch?: string[];
|
|
14
14
|
domains?: string[];
|
|
15
15
|
excludeWords?: string[];
|
|
16
16
|
custom?: string;
|
|
17
17
|
safeSearch?: boolean;
|
|
18
18
|
excludeDomains?: string[];
|
|
19
|
-
filterByTitles?: string[]
|
|
19
|
+
filterByTitles?: string[];
|
|
20
20
|
};
|
|
21
21
|
export default Config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "google-img-scrap",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Scrap images from google images with customs pre filled google dork options",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
|
+
"!dist/core/cookies-cache.json",
|
|
17
18
|
"CHANGELOG.md",
|
|
18
19
|
"README.md",
|
|
19
20
|
"tsconfig.json",
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cookies": "__Secure-BUCKET=COIB; __Secure-ENID=34.SE=lYXtPhxPp9zFj0NPDOqxmjpXKMiGZUdwhDaYwseXPrwivHg4stTYwUViyNXeatqx_Dj8j2J7ZoI8Bmup2LfKwc0mrLe4S_6NuATYwRbANzUKNw52D64sbU9jFfnR-b4RTDtwNCpEh5WTcLetlGx9oW2z9DF9OfLgRbXRYAGD9jQ5emh8nnYitAkX7zR2g8ASWyVkiK2pU84S4nlHElNAL0oD7CekAhJDikxtwxptlOV0S5G3twX2yshephkeYAiqFimd2UyMG6giwKrxA5eESjaMY4AJ2DhgOv22NLIKwVU",
|
|
3
|
-
"proxy": "",
|
|
4
|
-
"timestamp": 1781613406823
|
|
5
|
-
}
|