-
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
19 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/metascraper-soundcloud/__snapshots__/index.js.snap-shot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
exports['song 1'] = { | ||
"author": "Beauty Brain", | ||
"description": "Thanks for 5.000 likes on https://www.facebook.com/BeautyBrainMusic :D <3 <3 <3", | ||
"date": "2014-01-27T16:19:55.000Z", | ||
"image": "https://i1.sndcdn.com/artworks-000069142357-nwttc6-t500x500.jpg", | ||
"lang": "en", | ||
"logo": "https://a-v2.sndcdn.com/assets/images/sc-icons/ios-a62dfc8f.png", | ||
"publisher": "SoundCloud", | ||
"title": "Swag Bandicoot [FREE DOWNLOAD]", | ||
"url": "https://soundcloud.com/beautybrainsp/beauty-brain-swag-bandicoot" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"rules": [ | ||
"metascraper-soundcloud", | ||
"metascraper-author", | ||
"metascraper-date", | ||
"metascraper-description", | ||
"metascraper-image", | ||
"metascraper-lang", | ||
"metascraper-logo", | ||
"metascraper-publisher", | ||
"metascraper-title", | ||
"metascraper-url" | ||
] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
'use strict' | ||
|
||
const clearModule = require('clear-module') | ||
const snapshot = require('snap-shot') | ||
const { promisify } = require('util') | ||
const { resolve } = require('path') | ||
const fs = require('fs') | ||
|
||
const readFile = promisify(fs.readFile) | ||
|
||
let metascraper | ||
|
||
describe('metascraper-soundcloud', () => { | ||
before(() => { | ||
clearModule('metascraper') | ||
process.env.METASCRAPER_CONFIG_CWD = __dirname | ||
metascraper = require('metascraper') | ||
}) | ||
|
||
after(() => { | ||
clearModule('metascraper') | ||
delete process.env.METASCRAPER_CONFIG_CWD | ||
}) | ||
|
||
it('song', async () => { | ||
const html = await readFile(resolve(__dirname, 'fixtures/song.html')) | ||
const url = 'https://soundcloud.com/beautybrainsp/beauty-brain-swag-bandicoot' | ||
|
||
const metadata = await metascraper({ html, url }) | ||
snapshot(metadata) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--require should | ||
--reporter spec | ||
--timeout 120000 | ||
--slow 300 | ||
--bail | ||
--recursive |
This file was deleted.
Oops, something went wrong.