freeCodeCamp / freeCodeCamp/devdocs
[low priority refactoring] generalize executing JS during scraping
Abierto
- Lenguaje dominante
- Ruby
- Estrellas
- 39.5k
- Forks
- 2.6k
- Merge medio
- 4 d 32 min
- PR fusionados (30 d)
- 13
Descripción
If doc sites use client-side JavaScript to produce or fetch some of their content, we need to launch a headless browser and execute it. Currently scraper subclasses do that individually using capybara, e.g.
https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/scrapers/angularjs.rb#L42-L45
but it might be better to extract a helper method or config option, a little more like this:
https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/scrapers/webpack.rb#L43-L46
cc @dangeranger
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.