Skip to content

Commit

Permalink
feat: google_amp field
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Nov 27, 2020
1 parent 4968cb3 commit d79aab0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Options:
- h3_count
- h4_count
- canonical_count
- google_amp
- images
- images_without_alt
- images_alt_empty
Expand Down
2 changes: 2 additions & 0 deletions src/presets/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
'html_size',
'is_canonical',
'canonical_count',
'google_amp',
'h1_count',
'h2_count',
'h3_count',
Expand Down Expand Up @@ -136,6 +137,7 @@ module.exports = {
'keywords',
'h1',
'canonical',
'google_amp',
'og_image',
'og_title',
'schema_types',
Expand Down
1 change: 1 addition & 0 deletions src/presets/scraperFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
'result.h3_count',
'result.h4_count',
'result.canonical_count',
'result.google_amp',
'result.images',
'result.images_without_alt',
'result.images_alt_empty',
Expand Down
1 change: 1 addition & 0 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ module.exports = async (baseUrl, options = {}) => {
h3_count: $('h3').length,
h4_count: $('h4').length,
canonical_count: $('link[rel="canonical"]').length,
google_amp: $('link[rel="amphtml"]').length,
dom_size: document.getElementsByTagName('*').length,
head_size: document.head.innerHTML.length,
body_size: document.body.innerHTML.length,
Expand Down

0 comments on commit d79aab0

Please sign in to comment.