Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Apester Media (extension): Added meta tags extraction #17305

Merged

Conversation

OmriKeret
Copy link
Contributor

@OmriKeret OmriKeret commented Aug 6, 2018

Added the ability to extract article keywords & title

Due to increasing number of adapters of the AMP framework among publishers (as a complete desktop + mobile solution)we added the ability to extract article's meta keyword and title

  • Feature: extract article meta keywords when using the playlist embed code
  • Feature: extract article title when json ld exists on the page
  • Fix: loader kept on hanging when there was no content to display

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging 1833d22 into 9cee51b - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging 3832deb into 9cee51b - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging 875bcc8 into 9cee51b - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@OmriKeret
Copy link
Contributor Author

Hi @aghassemi,
We have an increasing number of adaptors who serve amphtml to their entire consumer base (not just through google cdn) and they use meta-keywords or jsonLd to describe their site.

We extract part of it's content to in order to improve our automatic contextual matching (which is the common implementation of the Apester units).

In addition I've updated the Apester loader and fixed an issue where we didn't remove the component when there was no content.
Can you review?

Thanks!

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging 23725e5 into 9cee51b - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging ff3ad24 into 9c05a22 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@codecov-io
Copy link

codecov-io commented Aug 6, 2018

Codecov Report

Merging #17305 into master will increase coverage by <.01%.
The diff coverage is 89.55%.

@@            Coverage Diff             @@
##           master   #17305      +/-   ##
==========================================
+ Coverage   77.44%   77.44%   +<.01%     
==========================================
  Files         565      565              
  Lines       41422    41472      +50     
==========================================
+ Hits        32079    32118      +39     
- Misses       9343     9354      +11
Flag Coverage Δ
#integration_tests 36.05% <ø> (-0.01%) ⬇️
#unit_tests 76.5% <89.55%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cee51b...9682bb3. Read the comment docs.

@aghassemi aghassemi self-requested a review August 6, 2018 16:38
@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging b3a8c80 into f381235 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 6, 2018

This pull request introduces 1 alert when merging c01fdd6 into 86ae732 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 7, 2018

This pull request introduces 1 alert when merging 48253b5 into 7259114 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 7, 2018

This pull request introduces 1 alert when merging c1bfb60 into 7259114 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 7, 2018

This pull request introduces 1 alert when merging ced2e70 into 7259114 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 7, 2018

This pull request introduces 1 alert when merging 488892e into 4e59eb5 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@ghost
Copy link

ghost commented Aug 7, 2018

This pull request introduces 1 alert when merging 9682bb3 into 59bd094 - view on LGTM.com

new alerts:

  • 1 for Missing space in string concatenation

Comment posted by LGTM.com

@@ -228,7 +228,7 @@ module.exports = {
timeout: process.env.TRAVIS ? 10000 : 2000,
},
captureConsole: true,
verboseLogging: false,
verboseLogging: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert

@@ -137,7 +140,7 @@ class AmpApesterMedia extends AMP.BaseElement {
(this.random_ = this.element.getAttribute(
'data-apester-channel-token'
)),
'Either the data-apester-media-id or the data-apester-channel-token ' +
'Either the data-apester-media-id or the data-apester-channel-token' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space at the end of sentence (broken concatenation)

* @return {!Array<string>}
*/
export function extratctTitle(root) {
const scriptTags = root.querySelectorAll(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use toArray from type.js here and then no longer need to do Array.prototype.map

@OmriKeret
Copy link
Contributor Author

Hi @aghassemi, Thanks for reviewing!
I changed the PR according to your comments.
Not sure why Travis fails since I merged with master.

Could you please review it again?
Thanks!

@aghassemi aghassemi merged commit 58ff9ae into ampproject:master Aug 14, 2018
@aghassemi
Copy link
Contributor

@OmriKeret merged.

@OmriKeret OmriKeret deleted the feature/contextual-random-unit branch August 15, 2018 07:20
Enriqe pushed a commit to Enriqe/amphtml that referenced this pull request Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants