Skip to content

Commit

Permalink
feat: images, images_without_alt
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 14, 2020
1 parent e058452 commit 2431b53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const fields_presets = {
'result.h2_count',
'result.h3_count',
'result.h4_count',
'result.images',
'result.images_without_alt',
'result.dom_size',
'result.html_size'
],
Expand Down Expand Up @@ -113,6 +115,8 @@ module.exports = async (baseUrl, options = {}) => {
head_size: document.head.innerHTML.length,
body_size: document.body.innerHTML.length,
html_size: document.head.innerHTML.length + document.body.innerHTML.length,
images: $('img').length,
images_without_alt: $('img:not([alt]').length,
description:
($('meta[name="description"]').attr('content') &&
$('meta[name="description"]')
Expand Down

0 comments on commit 2431b53

Please sign in to comment.