Skip to content

Commit 1b3aa93

Browse files
committed
Add soundcloud example
1 parent 9acc123 commit 1b3aa93

File tree

3 files changed

+1355
-0
lines changed

3 files changed

+1355
-0
lines changed

packages/metascraper/__snapshots__/index.js.snap-shot

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,3 +801,13 @@ exports['zdnet 1'] = {
801801
"url": "http://www.zdnet.com/article/email-security-startup-agari-raises-22-million-to-help-enterprises-fight-phishing-attacks"
802802
}
803803

804+
exports['soundcloud 1'] = {
805+
"author": null,
806+
"date": "2014-01-27T16:19:55.000Z",
807+
"description": "Thanks for 5.000 likes on https://www.facebook.com/BeautyBrainMusic :D <3 <3 <3",
808+
"image": "https://i1.sndcdn.com/artworks-000069142357-nwttc6-t500x500.jpg",
809+
"logo": "https://a-v2.sndcdn.com/assets/images/sc-icons/ios-a62dfc8f.png",
810+
"publisher": "SoundCloud",
811+
"title": "Swag Bandicoot [FREE DOWNLOAD]",
812+
"url": "https://soundcloud.com/beautybrainsp/beauty-brain-swag-bandicoot"
813+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict'
2+
3+
const snapshot = require('snap-shot')
4+
const { promisify } = require('util')
5+
const { resolve } = require('path')
6+
7+
const fs = require('fs')
8+
9+
const metascraper = require('../../..')
10+
const readFile = promisify(fs.readFile)
11+
12+
const url = 'https://soundcloud.com/beautybrainsp/beauty-brain-swag-bandicoot'
13+
14+
it('soundcloud', async () => {
15+
const html = await readFile(resolve(__dirname, 'input.html'))
16+
const metadata = await metascraper({ html, url })
17+
snapshot(metadata)
18+
})

packages/metascraper/test/integration/soundcloud/input.html

Lines changed: 1327 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)