cd /usr/local/src/ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 tar jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/
[vagrant@localhost src]$ phantomjs –version
2.1.1
from selenium import webdriver url = "http://www.aozora.gr.jp/cards/000081/files/46268_23911.html" browser = webdriver.PhantomJS() browser.implicitly_wait(3) browser.get(url) browser.save_screenshot("Website.png") browser.quite()
[vagrant@localhost python]$ python3 app.py
/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/site-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
warnings.warn(‘Selenium support for PhantomJS has been deprecated, please use headless ‘
Traceback (most recent call last):
File “app.py”, line 8, in
browser.quite()
AttributeError: ‘WebDriver’ object has no attribute ‘quite’
from selenium import webdriver url = "http://www.aozora.gr.jp/cards/000081/files/46268_23911.html" browser = webdriver.PhantomJS() browser.implicitly_wait(3) browser.get(url) browser.save_screenshot("Website.png") browser.quit()
[vagrant@localhost python]$ python3 app.py
/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/site-packages/selenium/webdriver/phantomjs/webdriver.py:49: UserWarning: Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
warnings.warn(‘Selenium support for PhantomJS has been deprecated, please use headless ‘
[vagrant@localhost src]$ cat /etc/fonts/conf.d/51-local.conf
[vagrant@localhost src]$ cat /etc/fonts/fonts.conf
mono, sans, san-serifがあるのはわかったが、migmixを入れろってか。