简体   繁体   中英

Need headless browser for Armv7 linux processor

I need a headless browser for webscraping.Recently i tried 3 different headless browsers( PhantomJS,Firefox,Chrome ).

When using phantomJS , it gives some error (ie):Armv7 processor needs GUI .

then,am using Firefox with geckodriver , it shows errors in the path and connection refused .

so that i moved to chrome headless browser with chromedriver ,but it also shows same errors as Firefox .

So,I need a correct headless browser for Armv7 processor. Can anyone suggest solution for that or any other way to proceed further.

安装较低版本的selenium在类似情况下解决了我的问题。

pip install selenium==2.53.5

Try the below procedure it worked for me.

geckodriver v0.19.0 the following versions are recommended:

Firefox 55.0 (and greater) Selenium 3.5 (and greater)

Download the geckodriver from https://github.com/mozilla/geckodriver/releases . After downloading, extract it and make it executable(in linux chmod +x path/to/geckdriver ).

from selenium import webdriver

geckoPath = 'path/to/geckodriver'
browser = webdriver.Firefox(executable_path=geckoPath)
browser.get('http://stackoverflow.com')
body_html = driver.find_element_by_xpath("/html/body")
print body_html.text

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM