metascraper-instagram 5.49.15 → 5.49.17

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/package.json +3 -4
  2. package/src/index.js +0 -11
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-instagram",
3
3
  "description": "Metascraper integration for Instagram",
4
4
  "homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-instagram",
5
- "version": "5.49.15",
5
+ "version": "5.49.17",
6
6
  "types": "src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "author": {
@@ -23,8 +23,7 @@
23
23
  "metascraper"
24
24
  ],
25
25
  "dependencies": {
26
- "@metascraper/helpers": "5.49.15",
27
- "franc": "~5.0.0"
26
+ "@metascraper/helpers": "5.49.17"
28
27
  },
29
28
  "devDependencies": {
30
29
  "ava": "5"
@@ -39,5 +38,5 @@
39
38
  "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
40
39
  },
41
40
  "license": "MIT",
42
- "gitHead": "2f0e1b59f853c02be3cafce581925536f62af712"
41
+ "gitHead": "18ff1053e27230642ce4bc13d1690260b26836fb"
43
42
  }
package/src/index.js CHANGED
@@ -1,19 +1,13 @@
1
1
  'use strict'
2
2
 
3
- const franc = require('franc')
4
-
5
3
  const {
6
4
  author,
7
5
  date,
8
- iso6393,
9
- lang,
10
6
  memoizeOne,
11
7
  parseUrl,
12
8
  title
13
9
  } = require('@metascraper/helpers')
14
10
 
15
- const detectLang = input => lang(iso6393[franc(input)])
16
-
17
11
  const test = memoizeOne(
18
12
  url => parseUrl(url).domainWithoutSuffix === 'instagram'
19
13
  )
@@ -37,11 +31,6 @@ module.exports = () => {
37
31
  const dateString = `${dateMatch[1]} GMT`
38
32
  return date(new Date(dateString))
39
33
  },
40
- lang: ({ htmlDom: $, url }) => {
41
- const description = getDescription(url, $)
42
- const input = description?.split(': ').pop()?.split(' - ').pop()
43
- return detectLang(input)
44
- },
45
34
  title: ({ htmlDom: $ }) =>
46
35
  title($('meta[name="twitter:title"]').attr('content'))
47
36
  }