小编Dav*_*vid的帖子

无法在AWS机器上的python中从selenium调用firefox

我试图使用python中的selenium用javascript抓取一些动态页面.但是,在我按照pypi页面上的selenium指令(http://pypi.python.org/pypi/selenium)后,我无法调用firefox.我在AWS ubuntu 12.04上安装了firefox.我得到的错误信息是:

In [1]: from selenium import webdriver

In [2]: br = webdriver.Firefox()
---------------------------------------------------------------------------
WebDriverException                        Traceback (most recent call last)
/home/ubuntu/<ipython-input-2-d6a5d754ea44> in <module>()
----> 1 br = webdriver.Firefox()

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.pyc in __init__(self, firefox_profile, firefox_binary, timeout)
     49         RemoteWebDriver.__init__(self,
     50             command_executor=ExtensionConnection("127.0.0.1", self.profile,
---> 51             self.binary, timeout),
     52             desired_capabilities=DesiredCapabilities.FIREFOX)
     53

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.pyc in __init__(self, host, firefox_profile, firefox_binary, timeout)
     45         self.profile.add_extension()
     46
---> 47         self.binary.launch_browser(self.profile)
     48         _URL = "http://%s:%d/hub" % (HOST, PORT)
     49         RemoteConnection.__init__(

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.pyc in launch_browser(self, profile)
     42
     43         self._start_from_profile_path(self.profile.path)
---> 44         self._wait_until_connectable()
     45 …
Run Code Online (Sandbox Code Playgroud)

python selenium screen-scraping amazon-web-services web-scraping

28
推荐指数
1
解决办法
2万
查看次数

heroku为节点:!Heroku推送拒绝,没有检测到Cedar支持的应用程序

我是heroku和express.js的新手.我试着通过这个教程,但我不能用'git push heroku master'来实现它.我完全按照教程.以下是错误消息:

Counting objects: 269, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (241/241), done.
Writing objects: 100% (269/269), 188.93 KiB, done.
Total 269 (delta 9), reused 0 (delta 0)
 !     Heroku push rejected, no Cedar-supported app detected

To git@heroku.com:cryptic-journey-9914.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:cryptic-journey-9914.git'
Run Code Online (Sandbox Code Playgroud)

javascript heroku node.js express

11
推荐指数
2
解决办法
1万
查看次数