File tree Expand file tree Collapse file tree 4 files changed +1375
-1
lines changed Expand file tree Collapse file tree 4 files changed +1375
-1
lines changed Original file line number Diff line number Diff line change @@ -79,5 +79,7 @@ module.exports = [
79
79
. filter ( ( i , el ) => $ ( el ) . text ( ) . trim ( ) )
80
80
. first ( )
81
81
. text ( )
82
- )
82
+ ) ,
83
+
84
+ wrap ( $ => $ ( '[class*="user-info"]' ) . text ( ) )
83
85
]
Original file line number Diff line number Diff line change
1
+ 'use strict'
2
+
3
+ const { load : loadJSON } = require ( 'json-future' )
4
+ const { resolve} = require ( 'path' )
5
+ const { promisify} = require ( 'util' )
6
+ const should = require ( 'should' )
7
+ const fs = require ( 'fs' )
8
+
9
+ const getMetaData = require ( '../../..' )
10
+ const readFile = promisify ( fs . readFile )
11
+
12
+ it ( 'video' , async ( ) => {
13
+ const html = await readFile ( resolve ( __dirname , 'input.html' ) )
14
+ const json = await loadJSON ( resolve ( __dirname , 'output.json' ) )
15
+ const metadata = await getMetaData ( html )
16
+ should ( metadata ) . be . deepEqual ( json )
17
+ } )
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ {
2
+ "author" : " Andrew Jrt" ,
3
+ "date" : " 2017-07-07T00:00:00.000Z" ,
4
+ "description" : " 👍 Subscribe - http://bit.do/AndrewJRT 🐦 Twitter - https://twitter.com/andrew_jrt 🎮 Twitch - https://twitch.tv/andrewjrt ❤ Patreon - https://www.patreon.com/a..." ,
5
+ "image" : " https://i.ytimg.com/vi/GDRd-BFTYIg/maxresdefault.jpg" ,
6
+ "publisher" : " YouTube" ,
7
+ "title" : " Overwatch - Huge Massive Fist Punch Man" ,
8
+ "url" : " https://www.youtube.com/watch?v=GDRd-BFTYIg"
9
+ }
You can’t perform that action at this time.
0 commit comments