improved wiki extractor

pull/1/head
Adam Pash 8 years ago
parent 52e89a0229
commit f2729a5ee6

@ -7,9 +7,10 @@ const WikipediaExtractor = {
// transform top infobox to an image with caption
transforms: {
'.infobox img': ($node, $) => {
'.infobox img': ($node) => {
$node.parents('.infobox').prepend($node)
},
'.infobox caption': 'figcaption',
'.infobox': 'figure',
},
@ -17,6 +18,7 @@ const WikipediaExtractor = {
clean: [
'.mw-editsection',
'figure tr, figure td, figure tbody',
'#toc',
],
},

Loading…
Cancel
Save