Is there a way to use PhantomJS in Python?

后端 未结 8 1393
死守一世寂寞
死守一世寂寞 2020-11-22 08:05

I want to use PhantomJS in Python. I googled this problem but couldn\'t find proper solutions.

I find os.popen() may be a good choice. But I couldn\'t

8条回答
  •  青春惊慌失措
    2020-11-22 08:19

    If using Anaconda, install with:

    conda install PhantomJS
    

    in your script:

    from selenium import webdriver
    driver=webdriver.PhantomJS()
    

    works perfectly.

提交回复
热议问题