...
|
...
|
@@ -54,10 +54,11 @@ const util = { |
|
|
|
|
|
let $ = cheerio.load(html, {decodeEntities: false});
|
|
|
|
|
|
_.each($(`img`).slice(0, num), item => {
|
|
|
_.each($('img').slice(0, num), item => {
|
|
|
let $dom = $(item);
|
|
|
|
|
|
$dom.attr('alt', $dom.attr('alt') || alt);
|
|
|
})
|
|
|
});
|
|
|
|
|
|
html = $.html();
|
|
|
$ = '';
|
...
|
...
|
|