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
local.conf
[vagrant@localhost src]$ cat /etc/fonts/fonts.conf
/usr/share/fonts
/usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts
~/.fonts
mono
monospace
sans serif
sans-serif
sans
sans-serif
conf.d
/var/cache/fontconfig
~/.fontconfig
0x0020
0x00A0
0x00AD
0x034F
0x0600
0x0601
0x0602
0x0603
0x06DD
0x070F
0x115F
0x1160
0x1680
0x17B4
0x17B5
0x180E
0x2000
0x2001
0x2002
0x2003
0x2004
0x2005
0x2006
0x2007
0x2008
0x2009
0x200A
0x200B
0x200C
0x200D
0x200E
0x200F
0x2028
0x2029
0x202A
0x202B
0x202C
0x202D
0x202E
0x202F
0x205F
0x2060
0x2061
0x2062
0x2063
0x206A
0x206B
0x206C
0x206D
0x206E
0x206F
0x2800
0x3000
0x3164
0xFEFF
0xFFA0
0xFFF9
0xFFFA
0xFFFB
30
mono, sans, san-serifがあるのはわかったが、migmixを入れろってか。