- requests-htmlを使えば複雑な操作以外はスクレイピング可能
- タグが閉じていない場合はrequests-htmlだとスクレイピングできない。
- 上記の場合はbeautifulsoupでパーサーをhtml5libにしておくとタグ補完してくれるので可能
- pyppetterの代わりにseleniumでもよい。
- seleniumはブラウザ操作のみのためスクレイピングはbeautifulsoupでする。
@startuml start :requests-html; :ページ表示; if (タグが見つからない) then (yes) :JavaScript; if (操作が必要) then (yes) :pyppetter; :操作; else(no) :requests-html; :レンダリング; endif else(no) :requests-html; endif :HTML表示; :スクレイピング; if (タグ抽出がシンプル) then (yes) if (操作が必要) then (yes) :pyppetter; else(no) :requests-html; endif else(no) :beautifulsoup; endif :抽出; end @enduml