metascraper-spotify 5.32.1 → 5.32.4

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.
Files changed (2) hide show
  1. package/index.js +6 -5
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -56,11 +56,12 @@ module.exports = ({ gotOpts, keyvOpts } = {}) => {
56
56
  ],
57
57
  date: getSpotify({ from: 'date' }),
58
58
  description: [
59
- toDescription($ => {
60
- const raw = $('meta[property="og:description"]').attr('content')
61
- if (!raw) return
62
- const [, description] = raw.split('on Spotify. ')
63
- return description
59
+ toDescription(($, url) => {
60
+ const description = $('meta[property="og:description"]').attr('content')
61
+ if (!description) return
62
+ return description.includes('on Spotify. ')
63
+ ? description.split('on Spotify. ')[1]
64
+ : description
64
65
  }),
65
66
 
66
67
  getSpotify({ from: 'description' })
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-spotify",
3
3
  "description": "Metascraper integration with Spotify",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-spotify",
5
- "version": "5.32.1",
5
+ "version": "5.32.4",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -24,10 +24,10 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@keyvhq/memoize": "~1.6.14",
27
- "@metascraper/helpers": "^5.32.1",
27
+ "@metascraper/helpers": "^5.32.4",
28
28
  "async-memoize-one": "~1.1.2",
29
29
  "got": "~11.8.5",
30
- "spotify-url-info": "~3.1.8"
30
+ "spotify-url-info": "~3.2.2"
31
31
  },
32
32
  "devDependencies": {
33
33
  "ava": "latest",
@@ -50,5 +50,5 @@
50
50
  "!test/helpers.js"
51
51
  ]
52
52
  },
53
- "gitHead": "c84494f4123c6aef7d0d0fb228e5df6fdd6d264a"
53
+ "gitHead": "3ae3a5a1667d6f346eeb4e92d91584ec0da951ac"
54
54
  }