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

Incorrect Content Extraction – Mercury Parser #115

Open
agmm opened this issue Feb 18, 2020 · 2 comments
Open

Incorrect Content Extraction – Mercury Parser #115

agmm opened this issue Feb 18, 2020 · 2 comments
Labels
question Further information is requested

Comments

@agmm
Copy link
Contributor

agmm commented Feb 18, 2020

Mercury Parser está teniendo dificultad al extraer el contenido de algunos artículos. En vez de extraer el contenido principal termina extrayendo otras partes de la página que no son relevantes.

@rnegron
Copy link
Owner

rnegron commented Feb 19, 2020

Lo noté también con algunos artículos recientemente. ¿Hay algo que podríamos hacer mejor respecto al content extraction de Mercury?

@rnegron rnegron added the question Further information is requested label Feb 19, 2020
@agmm
Copy link
Contributor Author

agmm commented Feb 19, 2020

Creo que lo mejor sería añadiendo custom extractors para cada site.

Like this:

const customExtractor = {
  domain: 'www.noticias.pr',
  title: {
    selectors: ['h1', '.ArticlePage-headline']
  },
  author: {
    selectors: ['.ArticlePage-authorInfo-bio-name']
  },
  content: {
    selectors: ['article']
  }
};

Mercury.addExtractor(customExtractor);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants