metascraper-spotify 5.35.1 → 5.36.0

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 +2 -4
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -10,7 +10,6 @@ const {
10
10
  composeRule,
11
11
  description,
12
12
  memoizeOne,
13
- normalizeUrl,
14
13
  parseUrl,
15
14
  sanetizeUrl,
16
15
  toRule
@@ -46,7 +45,7 @@ const test = memoizeOne(url => parseUrl(url).domainWithoutSuffix === 'spotify')
46
45
 
47
46
  module.exports = ({ gotOpts, keyvOpts } = {}) => {
48
47
  const spotify = createSpotify({ gotOpts, keyvOpts })
49
- const getSpotify = composeRule(($, url) => spotify(normalizeUrl(url)))
48
+ const getSpotify = composeRule((_, url) => spotify(url))
50
49
 
51
50
  const rules = {
52
51
  audio: getSpotify({ from: 'audio', ext: 'mp3' }),
@@ -56,14 +55,13 @@ module.exports = ({ gotOpts, keyvOpts } = {}) => {
56
55
  ],
57
56
  date: getSpotify({ from: 'date' }),
58
57
  description: [
59
- toDescription(($, url) => {
58
+ toDescription($ => {
60
59
  const description = $('meta[property="og:description"]').attr('content')
61
60
  if (!description) return
62
61
  return description.includes('on Spotify. ')
63
62
  ? description.split('on Spotify. ')[1]
64
63
  : description
65
64
  }),
66
-
67
65
  getSpotify({ from: 'description' })
68
66
  ],
69
67
  image: getSpotify({ from: 'image' }),
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.35.1",
5
+ "version": "5.36.0",
6
6
  "main": "index.js",
7
7
  "author": {
8
8
  "email": "hello@microlink.io",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@keyvhq/memoize": "~2.0.3",
27
- "@metascraper/helpers": "^5.35.1",
27
+ "@metascraper/helpers": "^5.36.0",
28
28
  "async-memoize-one": "~1.1.3",
29
29
  "got": "~11.8.6",
30
30
  "spotify-url-info": "~3.2.6"
@@ -50,5 +50,5 @@
50
50
  "!test/helpers.js"
51
51
  ]
52
52
  },
53
- "gitHead": "9e665d19255a3b6d0f864a96223460c99a5af746"
53
+ "gitHead": "c10dbbb9e98c16b72d34dcea301c7fecd71d760f"
54
54
  }