11
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SeleniumでPhantomJSを使う時に画像を読み込まない方法

Posted at

スクレイピングする際、JSで動的につくられるDOMだけが欲しくて、画像はいらないよって時に。

元ネタは、こちら

from selenium.webdriver import PhantomJS
driver = PhantomJS(service_args=['--load-images=no'])
driver.get('http://xxxxxx.xxxxx')

コンスラクタで、PhantomJSのコマンドラインパラメーターを渡す。

11
10
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
11
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?