LoginSignup
3
1

More than 3 years have passed since last update.

curlを使ってjavascriptを有効にした場合のhtmlソースを取得する

Last updated at Posted at 2020-07-04

domcurlというツールがあります。webscrapingに非常に便利なツールです。phantomjsなどで要件を満たせない場合におすすめです。

domcurlはPuppeteerを使う小さなNodeJSアプリケーションで、 npm i domcurlコマンドを発行することでインストールできます。 curlコマンドのように、簡単なdomcurl [url]を発行してリソースを取得し、JSをページ上で実行することができます。

https://paul.kinlan.me/domcurl/

$ npm i domcurl
$ ./node_modules/domcurl/index.js  --url https://example.com

注意 : タイトルは正確ではありませんが、検索のしやすさからcurlと表記しています

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1