@types/open-graph-scraper 4.8.4 → 5.2.3
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.
- open-graph-scraper/README.md +3 -15
- open-graph-scraper/package.json +5 -20
- open-graph-scraper/index.d.ts +0 -279
open-graph-scraper/README.md
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
# Summary
|
5
|
-
This package contains type definitions for open-graph-scraper (https://github.com/jshemas/openGraphScraper#readme).
|
6
|
-
|
7
|
-
# Details
|
8
|
-
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/open-graph-scraper.
|
9
|
-
|
10
|
-
### Additional Details
|
11
|
-
* Last updated: Wed, 18 Oct 2023 05:47:08 GMT
|
12
|
-
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
13
|
-
|
14
|
-
# Credits
|
15
|
-
These definitions were written by [Florian Imdahl](https://github.com/ffflorian).
|
1
|
+
This is a stub types definition for @types/open-graph-scraper (https://github.com/jshemas/openGraphScraper#readme).
|
2
|
+
|
3
|
+
open-graph-scraper provides its own type definitions, so you don't need @types/open-graph-scraper installed!
|
open-graph-scraper/package.json
CHANGED
@@ -1,27 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/open-graph-scraper",
|
3
|
-
"version": "
|
4
|
-
"description": "TypeScript definitions for open-graph-scraper",
|
5
|
-
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/open-graph-scraper",
|
6
|
-
"license": "MIT",
|
7
|
-
"contributors": [
|
8
|
-
{
|
9
|
-
"name": "Florian Imdahl",
|
10
|
-
"githubUsername": "ffflorian",
|
11
|
-
"url": "https://github.com/ffflorian"
|
12
|
-
}
|
13
|
-
],
|
3
|
+
"version": "5.2.3",
|
4
|
+
"description": "Stub TypeScript definitions entry for open-graph-scraper, which provides its own types definitions",
|
14
5
|
"main": "",
|
15
|
-
"types": "index.d.ts",
|
16
|
-
"repository": {
|
17
|
-
"type": "git",
|
18
|
-
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
19
|
-
"directory": "types/open-graph-scraper"
|
20
|
-
},
|
21
6
|
"scripts": {},
|
7
|
+
"license": "MIT",
|
22
8
|
"dependencies": {
|
23
|
-
"
|
9
|
+
"open-graph-scraper": "*"
|
24
10
|
},
|
25
|
-
"
|
26
|
-
"typeScriptVersion": "4.5"
|
11
|
+
"deprecated": "This is a stub types definition. open-graph-scraper provides its own type definitions, so you do not need this installed."
|
27
12
|
}
|
open-graph-scraper/index.d.ts
DELETED
@@ -1,279 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
|
3
|
-
import { PassThrough } from "stream";
|
4
|
-
|
5
|
-
declare namespace run {
|
6
|
-
interface OpenGraphImage {
|
7
|
-
// Height and Width can be optional, see doc on
|
8
|
-
// https://github.com/jshemas/openGraphScraper/blob/master/lib/media.js
|
9
|
-
height?: string;
|
10
|
-
type: string;
|
11
|
-
url: string;
|
12
|
-
width?: string;
|
13
|
-
}
|
14
|
-
|
15
|
-
interface OpenGraphProperties {
|
16
|
-
[key: string]: string | undefined;
|
17
|
-
alAndroidAppName?: string | undefined;
|
18
|
-
alAndroidClass?: string | undefined;
|
19
|
-
alAndroidPackage?: string | undefined;
|
20
|
-
alAndroidUrl?: string | undefined;
|
21
|
-
alIosAppName?: string | undefined;
|
22
|
-
alIosAppStoreId?: string | undefined;
|
23
|
-
alIosUrl?: string | undefined;
|
24
|
-
alIpadAppName?: string | undefined;
|
25
|
-
alIpadAppStoreId?: string | undefined;
|
26
|
-
alIpadUrl?: string | undefined;
|
27
|
-
alIphoneAppName?: string | undefined;
|
28
|
-
alIphoneAppStoreId?: string | undefined;
|
29
|
-
alIphoneUrl?: string | undefined;
|
30
|
-
alWebShouldFallback?: string | undefined;
|
31
|
-
alWebUrl?: string | undefined;
|
32
|
-
alWindowsAppId?: string | undefined;
|
33
|
-
alWindowsAppName?: string | undefined;
|
34
|
-
alWindowsPhoneAppId?: string | undefined;
|
35
|
-
alWindowsPhoneAppName?: string | undefined;
|
36
|
-
alWindowsPhoneUrl?: string | undefined;
|
37
|
-
alWindowsUniversalAppId?: string | undefined;
|
38
|
-
alWindowsUniversalAppName?: string | undefined;
|
39
|
-
alWindowsUniversalUrl?: string | undefined;
|
40
|
-
alWindowsUrl?: string | undefined;
|
41
|
-
articleAuthor?: string | undefined;
|
42
|
-
articleExpirationTime?: string | undefined;
|
43
|
-
articleModifiedTime?: string | undefined;
|
44
|
-
articlePublishedTime?: string | undefined;
|
45
|
-
articlePublisher?: string | undefined;
|
46
|
-
articleSection?: string | undefined;
|
47
|
-
articleTag?: string | undefined;
|
48
|
-
author?: string | undefined;
|
49
|
-
bookAuthor?: string | undefined;
|
50
|
-
bookCanonicalName?: string | undefined;
|
51
|
-
bookIsbn?: string | undefined;
|
52
|
-
bookReleaseDate?: string | undefined;
|
53
|
-
booksBook?: string | undefined;
|
54
|
-
booksRatingScale?: string | undefined;
|
55
|
-
booksRatingValue?: string | undefined;
|
56
|
-
bookTag?: string | undefined;
|
57
|
-
businessContactDataCountryName?: string | undefined;
|
58
|
-
businessContactDataLocality?: string | undefined;
|
59
|
-
businessContactDataPostalCode?: string | undefined;
|
60
|
-
businessContactDataRegion?: string | undefined;
|
61
|
-
businessContactDataStreetAddress?: string | undefined;
|
62
|
-
dcContributor?: string | undefined;
|
63
|
-
dcCoverage?: string | undefined;
|
64
|
-
dcCreator?: string | undefined;
|
65
|
-
dcDate?: string | undefined;
|
66
|
-
dcDateCreated?: string | undefined;
|
67
|
-
dcDateIssued?: string | undefined;
|
68
|
-
dcDescription?: string | undefined;
|
69
|
-
dcFormatMedia?: string | undefined;
|
70
|
-
dcFormatSize?: string | undefined;
|
71
|
-
dcIdentifier?: string | undefined;
|
72
|
-
dcLanguage?: string | undefined;
|
73
|
-
dcPublisher?: string | undefined;
|
74
|
-
dcRelation?: string | undefined;
|
75
|
-
dcRights?: string | undefined;
|
76
|
-
dcSource?: string | undefined;
|
77
|
-
dcSubject?: string | undefined;
|
78
|
-
dcTitle?: string | undefined;
|
79
|
-
dcType?: string | undefined;
|
80
|
-
modifiedTime?: string | undefined;
|
81
|
-
musicAlbum?: string | undefined;
|
82
|
-
musicAlbumDisc?: string | undefined;
|
83
|
-
musicAlbumTrack?: string | undefined;
|
84
|
-
musicAlbumUrl?: string | undefined;
|
85
|
-
musicCreator?: string | undefined;
|
86
|
-
musicDuration?: string | undefined;
|
87
|
-
musicMusician?: string | undefined;
|
88
|
-
musicReleaseDate?: string | undefined;
|
89
|
-
musicSong?: string | undefined;
|
90
|
-
musicSongDisc?: string | undefined;
|
91
|
-
musicSongTrack?: string | undefined;
|
92
|
-
musicSongUrl?: string | undefined;
|
93
|
-
ogArticleAuthor?: string | undefined;
|
94
|
-
ogArticleExpirationTime?: string | undefined;
|
95
|
-
ogArticleModifiedTime?: string | undefined;
|
96
|
-
ogArticlePublishedTime?: string | undefined;
|
97
|
-
ogArticlePublisher?: string | undefined;
|
98
|
-
ogArticleSection?: string | undefined;
|
99
|
-
ogArticleTag?: string | undefined;
|
100
|
-
ogAudio?: string | undefined;
|
101
|
-
ogAudioSecureURL?: string | undefined;
|
102
|
-
ogAudioType?: string | undefined;
|
103
|
-
ogAudioURL?: string | undefined;
|
104
|
-
ogAvailability?: string | undefined;
|
105
|
-
ogDate?: string | undefined;
|
106
|
-
ogDescription?: string | undefined;
|
107
|
-
ogDeterminer?: string | undefined;
|
108
|
-
ogImage?: string | undefined;
|
109
|
-
ogImageHeight?: string | undefined;
|
110
|
-
ogImageSecureURL?: string | undefined;
|
111
|
-
ogImageType?: string | undefined;
|
112
|
-
ogImageURL?: string | undefined;
|
113
|
-
ogImageWidth?: string | undefined;
|
114
|
-
ogLocale?: string | undefined;
|
115
|
-
ogLocaleAlternate?: string | undefined;
|
116
|
-
ogLogo?: string | undefined;
|
117
|
-
ogPriceAmount?: string | undefined;
|
118
|
-
ogPriceCurrency?: string | undefined;
|
119
|
-
ogProductAvailability?: string | undefined;
|
120
|
-
ogProductCondition?: string | undefined;
|
121
|
-
ogProductPriceAmount?: string | undefined;
|
122
|
-
ogProductPriceCurrency?: string | undefined;
|
123
|
-
ogProductRetailerItemId?: string | undefined;
|
124
|
-
ogSiteName?: string | undefined;
|
125
|
-
ogTitle?: string | undefined;
|
126
|
-
ogType?: string | undefined;
|
127
|
-
ogUrl?: string | undefined;
|
128
|
-
ogVideo?: string | undefined;
|
129
|
-
ogVideoActorId?: string | undefined;
|
130
|
-
ogVideoHeight?: string | undefined;
|
131
|
-
ogVideoSecureURL?: string | undefined;
|
132
|
-
ogVideoType?: string | undefined;
|
133
|
-
ogVideoWidth?: string | undefined;
|
134
|
-
placeLocationLatitude?: string | undefined;
|
135
|
-
placeLocationLongitude?: string | undefined;
|
136
|
-
profileFirstName?: string | undefined;
|
137
|
-
profileGender?: string | undefined;
|
138
|
-
profileLastName?: string | undefined;
|
139
|
-
profileUsername?: string | undefined;
|
140
|
-
publishedTime?: string | undefined;
|
141
|
-
releaseDate?: string | undefined;
|
142
|
-
restaurantContactInfoCountryName?: string | undefined;
|
143
|
-
restaurantContactInfoEmail?: string | undefined;
|
144
|
-
restaurantContactInfoLocality?: string | undefined;
|
145
|
-
restaurantContactInfoPhoneNumber?: string | undefined;
|
146
|
-
restaurantContactInfoPostalCode?: string | undefined;
|
147
|
-
restaurantContactInfoRegion?: string | undefined;
|
148
|
-
restaurantContactInfoStreetAddress?: string | undefined;
|
149
|
-
restaurantContactInfoWebsite?: string | undefined;
|
150
|
-
restaurantMenu?: string | undefined;
|
151
|
-
restaurantRestaurant?: string | undefined;
|
152
|
-
restaurantSection?: string | undefined;
|
153
|
-
restaurantVariationPriceAmount?: string | undefined;
|
154
|
-
restaurantVariationPriceCurrency?: string | undefined;
|
155
|
-
twitterAppIdGooglePlay?: string | undefined;
|
156
|
-
twitterAppIdiPad?: string | undefined;
|
157
|
-
twitterAppIdiPhone?: string | undefined;
|
158
|
-
twitterAppNameGooglePlay?: string | undefined;
|
159
|
-
twitterAppNameiPad?: string | undefined;
|
160
|
-
twitterAppNameiPhone?: string | undefined;
|
161
|
-
twitterAppUrlGooglePlay?: string | undefined;
|
162
|
-
twitterAppUrliPad?: string | undefined;
|
163
|
-
twitterAppUrliPhone?: string | undefined;
|
164
|
-
twitterCard?: string | undefined;
|
165
|
-
twitterCreator?: string | undefined;
|
166
|
-
twitterCreatorId?: string | undefined;
|
167
|
-
twitterDescription?: string | undefined;
|
168
|
-
twitterImage?: string | undefined;
|
169
|
-
twitterImageAlt?: string | undefined;
|
170
|
-
twitterImageHeight?: string | undefined;
|
171
|
-
twitterImageSrc?: string | undefined;
|
172
|
-
twitterImageWidth?: string | undefined;
|
173
|
-
twitterPlayer?: string | undefined;
|
174
|
-
twitterPlayerHeight?: string | undefined;
|
175
|
-
twitterPlayerStream?: string | undefined;
|
176
|
-
twitterPlayerStreamContentType?: string | undefined;
|
177
|
-
twitterPlayerWidth?: string | undefined;
|
178
|
-
twitterSite?: string | undefined;
|
179
|
-
twitterSiteId?: string | undefined;
|
180
|
-
twitterTitle?: string | undefined;
|
181
|
-
twitterUrl?: string | undefined;
|
182
|
-
updatedTime?: string | undefined;
|
183
|
-
}
|
184
|
-
|
185
|
-
interface SuccessResult {
|
186
|
-
error: false;
|
187
|
-
result: OpenGraphProperties & {
|
188
|
-
ogImage?: OpenGraphImage | OpenGraphImage[] | undefined;
|
189
|
-
success: true;
|
190
|
-
};
|
191
|
-
response: PassThrough;
|
192
|
-
}
|
193
|
-
|
194
|
-
interface ErrorResult {
|
195
|
-
error: true;
|
196
|
-
result: {
|
197
|
-
error: string;
|
198
|
-
errorDetails: Error;
|
199
|
-
success: false;
|
200
|
-
};
|
201
|
-
}
|
202
|
-
|
203
|
-
interface URLValidatorSettings {
|
204
|
-
/** default is `false`. */
|
205
|
-
allow_protocol_relative_urls?: boolean | undefined;
|
206
|
-
/** default is `false`. */
|
207
|
-
allow_trailing_dot?: boolean | undefined;
|
208
|
-
/** default is `false`. */
|
209
|
-
allow_underscores?: boolean | undefined;
|
210
|
-
/** default is `false`. */
|
211
|
-
disallow_auth?: boolean | undefined;
|
212
|
-
/** default is `false`. */
|
213
|
-
host_blacklist?: boolean | undefined;
|
214
|
-
/** default is `false`. */
|
215
|
-
host_whitelist?: boolean | undefined;
|
216
|
-
/** default is `['http', 'https']`. */
|
217
|
-
protocols?: string[] | undefined;
|
218
|
-
/** default is `true`. */
|
219
|
-
require_host?: boolean | undefined;
|
220
|
-
/** default is `false`. */
|
221
|
-
require_protocol?: boolean | undefined;
|
222
|
-
/** default is `true`. */
|
223
|
-
require_tld?: boolean | undefined;
|
224
|
-
/** default is `true`. */
|
225
|
-
require_valid_protocol?: boolean | undefined;
|
226
|
-
}
|
227
|
-
|
228
|
-
interface CustomMetaTag {
|
229
|
-
multiple?: boolean | undefined;
|
230
|
-
property: string;
|
231
|
-
fieldName: string;
|
232
|
-
}
|
233
|
-
|
234
|
-
interface Options {
|
235
|
-
/** By default, OGS will only send back the first image/video it finds (default: `false`). */
|
236
|
-
allMedia?: boolean | undefined;
|
237
|
-
/** Pass in an array of sites you don't want `og`s to run on. */
|
238
|
-
blacklist?: string[] | undefined;
|
239
|
-
/** Set the accept-encoding to `gzip/deflate` (default: `true`). */
|
240
|
-
decompress?: boolean | undefined;
|
241
|
-
/**
|
242
|
-
* Setting this to `null` might help with running `og`s on non english websites (default: `utf8`).
|
243
|
-
* @deprecated
|
244
|
-
*/
|
245
|
-
encoding?: string | null | undefined;
|
246
|
-
/** Defines if redirect responses should be followed automatically (default: `true`). */
|
247
|
-
followRedirect?: boolean | undefined;
|
248
|
-
/** An object containing request headers. Useful for setting the user-agent. */
|
249
|
-
headers?: Record<string, string> | undefined;
|
250
|
-
/** You can pass in an HTML string to run `og`s on it (use without `options.url`). */
|
251
|
-
html?: string | undefined;
|
252
|
-
/** Max number of redirects `og`s will follow (default: `10`). */
|
253
|
-
maxRedirects?: number | undefined;
|
254
|
-
/** Fetch other images if no open graph ones are found (default: `true`). */
|
255
|
-
ogImageFallback?: boolean | undefined;
|
256
|
-
/** Only fetch open graph info and don't fall back on anything else (default: `false`). */
|
257
|
-
onlyGetOpenGraphInfo?: boolean | undefined;
|
258
|
-
/** Sets the peekSize for the request (default: `1024`). */
|
259
|
-
peekSize?: number | undefined;
|
260
|
-
/** Number of times `og`s will retry the request (default: `2`). */
|
261
|
-
retry?: number | undefined;
|
262
|
-
/** Timeout of the request in ms (default: `2000`). */
|
263
|
-
timeout?: number | undefined;
|
264
|
-
/** URL of the site. */
|
265
|
-
url: string;
|
266
|
-
/** Sets the options used by `validator.js` for testing the URL. */
|
267
|
-
urlValidatorSettings?: URLValidatorSettings | undefined;
|
268
|
-
/** Here you can define custom meta tags you want to scrape. */
|
269
|
-
customMetaTags?: CustomMetaTag[] | undefined;
|
270
|
-
}
|
271
|
-
}
|
272
|
-
|
273
|
-
declare function run(options: run.Options): Promise<run.SuccessResult | run.ErrorResult>;
|
274
|
-
declare function run(
|
275
|
-
options: run.Options,
|
276
|
-
callback: (error: boolean, results: run.SuccessResult | run.ErrorResult, response: PassThrough) => void,
|
277
|
-
): void;
|
278
|
-
|
279
|
-
export = run;
|