freeCodeCamp / freeCodeCamp/devdocs
[low priority refactoring] generalize executing JS during scraping
- 主要言語
- Ruby
- スター
- 39.5k
- フォーク
- 2.6k
- 平均マージ
- 4日 32分
- マージ済み PR(30日)
- 13
説明
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
コントリビューションガイド
調査の方向性
Start by comparing lib/docs/scrapers/angularjs.rb#L42-L45 with lib/docs/scrapers/webpack.rb#L43-L46 to understand the existing Capybara-based JavaScript execution patterns. Trace how scraper configuration and helpers are organized, then define a shared approach that preserves the relevant scraper behavior and verify affected scrapers still produce their expected content.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ruby
- 領域
- documentation, tooling
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100