Skip to content

Commit

Permalink
feat: images_outer
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Apr 20, 2020
1 parent 009dedb commit 007995d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const fields_presets = {
'result.images',
'result.images_without_alt',
'result.images_alt_empty',
'result.images_outer',
'result.links',
'result.links_inner',
'result.links_outer',
Expand Down Expand Up @@ -156,6 +157,7 @@ module.exports = async (baseUrl, options = {}) => {
images: $('img').length,
images_without_alt: $('img:not([alt]').length,
images_alt_empty: $('img[alt=""]').length,
images_outer: $('img[src]:not([src^="/"]):not([src*="'+domain2level+'"])').length,
links: $('a[href]:not([href^="javascript"]):not([href^="#"])').length,
links_inner: $('a[href^="/"], a[href*="'+domain2level+'"]').length,
links_outer: $('a[href]:not([href^="javascript"]):not([href^="#"]):not([href^="/"]):not([href*="'+domain2level+'"])').length,
Expand Down

0 comments on commit 007995d

Please sign in to comment.