Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/metascraper-audio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"dependencies": {
"@metascraper/helpers": "workspace:*",
"lodash": "~4.17.21",
"lodash": "~4.17.23",
"p-reflect": "~2.1.0"
},
"devDependencies": {
Expand Down
11 changes: 5 additions & 6 deletions packages/metascraper-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,20 @@
"condense-whitespace": "~2.0.0",
"data-uri-utils": "~1.0.9",
"debug-logfmt": "~1.4.7",
"entities": "~6.0.1",
"entities": "~7.0.1",
"file-extension": "~4.0.5",
"has-values": "~2.0.1",
"image-extensions": "~1.1.0",
"is-relative-url": "~3.0.0",
"is-uri": "~1.2.12",
"iso-639-3": "~2.2.0",
"isostring": "0.0.1",
"jsdom": "~27.2.0",
"lodash": "~4.17.21",
"jsdom": "~27.4.0",
"lodash": "~4.17.23",
"memoize-one": "~6.0.0",
"microsoft-capitalize": "~1.0.5",
"microsoft-capitalize": "~1.0.6",
"mime": "3",
"normalize-url": "~6.1.0",
"re2": "~1.22.3",
"re2": "~1.23.0",
"smartquotes": "~2.3.2",
"tldts": "~7.0.19",
"url-regex-safe": "~4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-iframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@metascraper/helpers": "workspace:*",
"got": "~11.8.6",
"lodash": "~4.17.21",
"lodash": "~4.17.23",
"oembed-spec": "~1.3.32",
"p-reflect": "~2.1.0"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/metascraper-instagram/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"metascraper"
],
"dependencies": {
"@metascraper/helpers": "workspace:*",
"franc": "~5.0.0"
"@metascraper/helpers": "workspace:*"
},
"devDependencies": {
"ava": "5"
Expand Down
11 changes: 0 additions & 11 deletions packages/metascraper-instagram/src/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
'use strict'

const franc = require('franc')

const {
author,
date,
iso6393,
lang,
memoizeOne,
parseUrl,
title
} = require('@metascraper/helpers')

const detectLang = input => lang(iso6393[franc(input)])

const test = memoizeOne(
url => parseUrl(url).domainWithoutSuffix === 'instagram'
)
Expand All @@ -37,11 +31,6 @@ module.exports = () => {
const dateString = `${dateMatch[1]} GMT`
return date(new Date(dateString))
},
lang: ({ htmlDom: $, url }) => {
const description = getDescription(url, $)
const input = description?.split(': ').pop()?.split(' - ').pop()
return detectLang(input)
},
title: ({ htmlDom: $ }) =>
title($('meta[name="twitter:title"]').attr('content'))
}
Expand Down
6 changes: 3 additions & 3 deletions packages/metascraper-instagram/test/snapshots/index.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Generated by [AVA](https://avajs.dev).
date: '2021-05-29T00:00:00.000Z',
description: '298K likes, 553 comments - willyrex on May 29, 2021: “Una de mis nuevas sudaderas top!! Per ardua ad astra 🚀🚀🚀”.',
image: 'https://scontent-mad1-1.cdninstagram.com/v/t51.29350-15/192808438_308120607576085_8247727303942216319_n.jpg?stp=c288.0.864.864a_dst-jpg_e35_s640x640_tt6&_nc_cat=106&ccb=1-7&_nc_sid=18de74&_nc_ohc=vbNYgMq4478Q7kNvgGlZ7qJ&_nc_zt=23&_nc_ht=scontent-mad1-1.cdninstagram.com&_nc_gid=A3NWPo2HYchDUw7WBR46EUm&oh=00_AYCe4zSS0AYp5Y4l-Oya17aAQMRZF84Nel4b32DeiidaxA&oe=677852B0',
lang: 'pt',
lang: 'en',
logo: 'https://static.cdninstagram.com/rsrc.php/v4/yI/r/VsNE-OHk_8a.png',
publisher: 'Instagram',
title: 'Willyrex (@willyrex) • Instagram photo',
Expand All @@ -46,7 +46,7 @@ Generated by [AVA](https://avajs.dev).
description: `534K likes, 5,064 comments - willyrex on May 8, 2021: ”¿Listos? Nuevo #SORTEO en mi perfil 📱 Una vez más os traigo lo nuevo de OPPO, os presento el nuevo #OPPOFindX3Neo Su cámara es una auténtica locura, viene con Sensor IMX766 de 50 MP. Por la batería no os preocupéis, tiene carga SuperVOOC 2.0, 100% en 38 min. Además, tiene un diseño fino y ultraligero 🏸 ¿Queréis uno como el mío? Participa ahora mismo: - Dale like a la publicación␊
- Sigue a OPPO @oppomobilees ¡Mucha suerte amig@s!”.`,
image: 'https://scontent-mad2-1.cdninstagram.com/v/t51.29350-15/183037094_508540027000559_4927547535791161246_n.jpg?stp=c288.0.864.864a_dst-jpg_e35_s640x640_tt6&_nc_cat=104&ccb=1-7&_nc_sid=18de74&_nc_aid=0&_nc_ohc=Cie5q_gxLLYQ7kNvgEqiXD8&_nc_zt=23&_nc_ht=scontent-mad2-1.cdninstagram.com&_nc_gid=Ad8PSpquy5AZh1Pohh2JB72&oh=00_AYAE8CT9LyH7gYy8-q8TTXDRHsscgXiUHkz4a935bIIEmw&oe=67785396',
lang: 'es',
lang: 'en',
logo: 'https://static.cdninstagram.com/rsrc.php/v4/yI/r/VsNE-OHk_8a.png',
publisher: 'Instagram',
title: 'Willyrex (@willyrex) • Instagram photos and videos',
Expand All @@ -64,7 +64,7 @@ Generated by [AVA](https://avajs.dev).
Volumen 1 -3 de Septiembre␊
Volumen 2 -3 de Diciembre @netflixes @netflix @vancouvermediaproducciones Vamos!!!!❤️❤️❤️❤️”.`,
image: 'https://scontent-mad1-1.cdninstagram.com/v/t51.29350-15/191230544_467582901000109_7680987700811244011_n.jpg?stp=cmp1_dst-jpg_e35_s640x640_tt6&_nc_cat=105&ccb=1-7&_nc_sid=18de74&_nc_aid=0&_nc_ohc=kHLqxxCqPnoQ7kNvgFtd7Tr&_nc_zt=23&_nc_ht=scontent-mad1-1.cdninstagram.com&_nc_gid=AwDftrpFPN2gmnPrNcbD1K-&oh=00_AYDtTqr62Rie_rhcHZDF-_YhJbqfr33wUJWoEUZR307AIQ&oe=677834EB',
lang: 'es',
lang: 'en',
logo: 'https://static.cdninstagram.com/rsrc.php/v4/yI/r/VsNE-OHk_8a.png',
publisher: 'Instagram',
title: 'Jaime Lorente (@jaimelorentelo) • Instagram video',
Expand Down
Binary file modified packages/metascraper-instagram/test/snapshots/index.js.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/metascraper-logo-favicon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@keyvhq/memoize": "~2.1.11",
"@metascraper/helpers": "workspace:*",
"lodash": "~4.17.21",
"lodash": "~4.17.23",
"reachable-url": "~1.8.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-logo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"dependencies": {
"@metascraper/helpers": "workspace:*",
"lodash": "~4.17.21"
"lodash": "~4.17.23"
},
"engines": {
"node": ">= 16"
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"async-memoize-one": "~1.1.9",
"data-uri-to-buffer": "~5.0.1",
"got": "~11.8.6",
"lodash": "~4.17.21"
"lodash": "~4.17.23"
},
"devDependencies": {
"ava": "5"
Expand Down
4 changes: 2 additions & 2 deletions packages/metascraper-media-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"async-memoize-one": "~1.1.9",
"debug-logfmt": "~1.4.7",
"got": "~11.8.6",
"lodash": "~4.17.21",
"lodash": "~4.17.23",
"p-reflect": "~2.1.0",
"p-retry": "~4.6.1",
"p-timeout": "~4.1.0",
"serialize-error": "~8.1.0",
"youtube-dl-exec": "~3.0.27"
"youtube-dl-exec": "~3.0.29"
},
"devDependencies": {
"@kikobeats/time-span": "latest",
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-readability/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@metascraper/helpers": "workspace:*",
"@mozilla/readability": "~0.6.0",
"async-memoize-one": "~1.1.9",
"happy-dom": "~20.0.11"
"happy-dom": "~20.3.4"
},
"devDependencies": {
"ava": "5"
Expand Down
2 changes: 1 addition & 1 deletion packages/metascraper-video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"dependencies": {
"@metascraper/helpers": "workspace:*",
"lodash": "~4.17.21",
"lodash": "~4.17.23",
"p-reflect": "~2.1.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/metascraper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"dependencies": {
"@metascraper/helpers": "workspace:*",
"cheerio": "~1.1.2",
"debug-logfmt": "~1.4.6",
"whoops": "~5.0.5"
"debug-logfmt": "~1.4.7",
"whoops": "~5.0.7"
},
"devDependencies": {
"ava": "5",
Expand Down
Loading