- Remove new lines from jsonLD.
- If url string is not
isLatin1
then encode it, otherwise you will run intoByteString
errors withinfetch
- Updating dependencies
- Fixing issue where setting
fetchOptions.headers
would replace the defaultheaders
- Updating dependencies
- Updating how
onlyGetOpenGraphInfo
works. By default it isfalse
but now it accepts an array of properties for which no fallback should be used. - Updating how you get types
import { SuccessResult } from 'open-graph-scraper/types';
. See readme for details. - Updating dependencies
- Adding
types
to the npm export. You can now useimport { SuccessResult } from 'open-graph-scraper/types/lib/types';
- Updating dependencies
- Remove
default
export off of therun
function and just setexport
torun
. - Updating dependencies
- Replace
validator
with internal version ofisUrl
so we have better control on how that works. - Fix issue where
JSON
parsing fails when Youtube escape '&' to '\x26'. - Updating dependencies
- Fix issue with the
charset
fallback. Replace Buffer.from with Uint8Array since body is always html - Updating dependencies to fix npm vulnerabilities
- Fixed issue with
package.json
exports
was not working inCommonJs
projects. - Fixed issue where if the
jsonLD
tag was empty, it would cause a error.
- Use
node16
formodule
/moduleResolution
ESM build - Fixed issue with
package.json
exports
was not working inNextJs
projects.
- Updating the
tsc
build process to better support bothESM
andcommonJS
- Fixed issue where some meta tags would always come back as array even thought there was only ever one meta tag.
- Removed the
dist
folder from version control - Start running node22 in the CI pipeline
- General typescript clean up
- Example service will only return the
result
of OGS now - Updating dependencies
- adding a new favicon fallback using appIcon
- Updating dependencies to fix npm vulnerabilities
- jsonLD is now a array of objects since there can be more then one jsonLD tag pre page
- Updating dependencies to fix npm vulnerabilities
- Adding support for JSON LD
- Adding support for
og:image:alt
,twitterAccount
,fbAppId
and extra og tags formusic
andvideo
- Fixing jsdoc param name
- Updating dependencies
- Add character encoding detection and decoding logic using
iconv-lite
- Updating dependencies
- Adding check to make sure
customMetaTags
are valid - Updating dependencies
- Updating dependencies
- Sent the
Accept: text/html
header by default
- Fixing issue with npm
- Adding a fallback for
charset
usinghttp-equiv
- Updating dependencies to fix npm vulnerabilities
- Export
SuccessResult
andErrorResult
types - Updating dependencies
- Updating dependencies to fix npm vulnerabilities
- Send back more details when there is a server error
- Modified the
url
property inOpenGraphScraperOptions
to be an optional property since you don't need this when using justhtml
Type
can optional inImageObject
since type is not set it it's invalid- Take all of the
customMetaTags
out of base ofogObject
and store them intoogObject.customMetaTags
- The internal meta properties can be string arrays
- Updating Dependencies
- Setting the
origin
header
to the request url sincefetch
runs in cors mode by default. - Import
undici
forfetch
so all versions of node18 are running the same version offetch
. Now ogs supports all versions of node18! - Updating Dependencies
OpenGraphScraperOptions.fetchOptions
should be of typeRequestInit
instead ofRequest
.- Updating Dependencies
- Replace
GOT
with fetch! - Only supporting
node18
or higher going forward - Updated how options work.
Fetch
andOGS
options no longer being mixed together, users can now set fetch options usingoptions.fetchOptions
- Remove any ogImages/ogVideos/twitterImages/twitterPlayers/musicSongs results that have no url
- The
downloadLimit
option has been removed in favor of just using timeouts. - Limit ogImages/ogVideos/twitterImages/twitterPlayers/musicSongs to 10 items
- Adding html to the
SuccessResult
ofOGS
- Adding
options.timeout
to set the fetch request timeout. (default is 10 seconds) - Remove
null
values from ogImages/ogVideos/twitterImages/twitterPlayers/musicSongs - Removing
options.allMedia
, you can just grab the first value of the array for the pervious behavior - Removing
options.ogImageFallback
, you can setoptions.onlyGetOpenGraphInfo
totrue
for the pervious behavior - ogImages/ogVideos/twitterImages/twitterPlayers/musicSongs will always be an array now, you can just grab the first value of the array for the pervious behavior
- Updating Dependencies
- Add in declaration files for typescript users.
- Specify true/false to distinguish
SuccessResult
andErrorResult
byerror
field.
- Adding the importsNotUsedAsValues flag and fixing type import issues
- Remove the
charset
lib and just usechardet
for finding the html encoding - Remove
peekSize
option since that was used bycharset
- Updating the
charset
fallback to be more reliable - Adding support for
article:published_date
andarticle:modified_date
meta tags - Updating Dependencies
- Fix issue where using
import
would cause typescript errors - Updating the
urlValidatorSettings
defaults to matchvalidatorjs
- Updating Dependencies
- Convert source code to typescript
- Changing
response.body
to be astring
andresponse.rawBody
to be abuffer
. They now match thenode
type forresponse
. - Updating Dependencies
- Adding
twitterImageObject
andtwitterPlayerObject
types - Updating Dependencies
- The
options.downloadLimit
type now allows forfalse
- Updating Dependencies
- Adding successResult and errorResult types
- TS export now has common GOT options.
- Updating Dependencies
- TS export run as a Promise
- Updating Docs
- Updating Dependencies
- Updating to
got
version 12! - Adding typescript support.
- The
retry
option is now a object -> https://github.com/sindresorhus/got/blob/main/documentation/7-retry.md#retry - The
timeout
option is now a object -> https://github.com/sindresorhus/got/blob/main/documentation/6-timeout.md#timeout-options - Dropping callback support. If you still want to use callbacks, you can use
callbackify
-> https://nodejs.org/api/util.html#util_util_callbackify_original - Auth errors will now be passed back to the clint and will no long just be
Page not found
errors. - Dropping support for node12 since
got
no longer supports it. - Removing
options.encoding
. - Updating Dependencies
- Updating Dependencies to fix a security vulnerability
- Adding support for fetching the favicon
- Updating Dependencies
- Adding a check for the
content-type
header, it has to containtext/html
- Adding
options.downloadLimit
, it sets the maximum size of the content downloaded from the server, in bytes - Updating Dependencies
- Updating Dependencies to fix a security vulnerability
- Updating Dependencies to fix a security vulnerability
- Dropping support for Node10 since it has reach it's end of life
- Setting response.rawBody to the parsed body since response.body is a buffer
- Updating Dependencies
- Adding support for Node16
- Updating Dependencies
- Fixing bug where the title fallback would return multiple titles
- Adding support for Proxies
- Updating Dependencies
- Updating Dependencies to fix a security vulnerability
- Adding
options.urlValidatorSettings
, it sets the options used by validator.js for testing the URL - Updating Dependencies
- Fixing issue where you would get a false positive errors with pages that have
.tar
in it likewww.target.com
- Split extract and request into their own files
- Updating Dependencies
- Fixing issue where you couldn't set the
ogImageFallback
option to false - Fixing image type fallback so it works with arrays
- Adding support for custom meta tags you want to scrape
- If ogs thinks the URL isn't a HTML page, it will return a 'Must scrape an HTML page' error.
- Updating Dependencies
- Adding support for app links meta data
- Removed the
withCharset
option, you can useonlyGetOpenGraphInfo
now if you do not want charset - Removed the
runChar
option, this will always be turned on options.encoding === null
is now deprecated- Updating image fallback to only send back valid URLs
- Updating Dependencies
- Small code clean up and adding tests
- Updating Dependencies
- Adding support for request headers
- Make sure item.fieldName exists before trying to use it
- Updating devDependencies
- Updating eslint rule set to be more simple
- Fixed the badge icon in the readme
- Checking for new tags like article, book, profile, business and restaurant
- Adding support for Dublin Core tags!
- Updating image fallback to send back width/height/type
- Adding more title/description/locale/audio/other fallbacks
- Fixed bug where if there was a weird casing on a meta, ogs would skip it
- Will no longer return undefined values in some cases
- Updating dependencies and removed lodash
- Updating to use github actions for CI!
- Updating to use
validators.js
'sisURL
to check user input URLs - Moving snyk to be under devDependencies
- Dropping support for any node version under 10
- Open Graph values are no longer nested in a data object.
- Stop using request.js(deprecated) and start using got.js
- Using promises will now send the error/result/response back in one object.
- Options.gzip is now options.decompress
- Options.followAllRedirects is now options.followRedirect
- Drop support for options.jar
- Options.timeout must be a number value
- Updating error messaging
- Updating dependencies
- Updating lodash.
- Updating dependencies to vulnerabilities.
- Replaced jschardet with charde.
- Updating dependencies.
- Adding Open Graph music tags!
- Adding a new option for the 'jar' setting for requests. It will now be turned off by default.
- Code refactor to work in an es5 environment!
- Website that don't have Open Graph images will now return an array of all of the images on the site
- Updating lodash to fix vulnerable
- Returns more info on the error occurred when using promises
- Catch iconv exception to prevent unexpected charset
- Checking for Open Graph price and availability info
- Updating packages
- Adding ability to extract meta from HTML string
- Adding CHANGELOG.md
- Fixing coverage reporter
- Fixing tests
- Updated dependencies to their latest version(s)
- Officially now support Node.js v4 and up
- Adds unit tests to ensure code quality
- Adds options for encoding, blacklist, followAllRedirects, and maxRedirects
- Module can now be used a promise
err
is nowerror
- Adds check for Open Graph product info