简体   繁体   English

需要用于Armv7 Linux处理器的无头浏览器

[英]Need headless browser for Armv7 linux processor

I need a headless browser for webscraping.Recently i tried 3 different headless browsers( PhantomJS,Firefox,Chrome ). 我需要一个无头浏览器进行网络抓取。最近,我尝试了3种不同的无头浏览器( PhantomJS,Firefox,Chrome )。

When using phantomJS , it gives some error (ie):Armv7 processor needs GUI . 使用phantomJS时 ,会出现一些错误(即):Armv7处理器需要GUI

then,am using Firefox with geckodriver , it shows errors in the path and connection refused . 然后,使用带有geckodriver的Firefox ,它显示路径错误和连接被拒绝

so that i moved to chrome headless browser with chromedriver ,but it also shows same errors as Firefox . 因此,我使用chromedriver移至chrome无头浏览器 ,但它也显示了与Firefox相同的错误

So,I need a correct headless browser for Armv7 processor. 因此,我需要用于Armv7处理器的正确的无头浏览器。 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: geckodriver v0.19.0推荐以下版本:

Firefox 55.0 (and greater) Selenium 3.5 (and greater) Firefox 55.0(及更高版本)Selenium 3.5(及更高版本)

Download the geckodriver from https://github.com/mozilla/geckodriver/releases . https://github.com/mozilla/geckodriver/releases下载geckodriver。 After downloading, extract it and make it executable(in linux chmod +x path/to/geckdriver ). 下载后,将其解压缩并使其可执行(在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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ARMv7硬浮点处理器体系结构是否存在node.js二进制文件? - Do node.js binaries exist for the ARMv7 hard-float processor architecture? Telethon 在 armv6(但不是 armv7)上被取消身份验证 - Telethon gets disauthenticated on armv6 (but not armv7) 如何使用 docker buildx bake 为 linux/armv7 和 linux/amd64 构建 docker 组合容器 - How to use docker buildx bake to build docker compose containers for both linux/armv7 and linux/amd64 我需要使用硒python在ec2上运行无头浏览器。 我尝试了无头的chrome,但是没有用 - I need to run headless browser on ec2 using selenium python. I tried chrome headless but it didn't work 无头浏览器仍然可见 - headless browser is still visible 适用于GAE的Python无头浏览器 - Python Headless Browser for GAE selenium webdriver在带firefox浏览器的无头Linux上使用python在下拉菜单中选择一个选项 - selenium webdriver select an option in dropdown menu using python on headless Linux with firefox browser 找不到架构 armv7 的符号(在 Xcode 和 Python3 中运行存档时) - symbol(s) not found for architecture armv7 (when running Archive in Xcode and Python3) 在Linux中使用Selenium运行无头Firefox - Running headless firefox with selenium in Linux 录制无头硒浏览器的视频 - Recording video of headless selenium browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM