Closed Guxinnn closed 8 years ago
Yes, this script needs Firefox or Phantonjs to imitate browser operation. You'd better install firefox 46, not 47.
Pretty much what Light said. You need to install firefox and (possibly) specify the file path to selenium.
Thank you for your code. However I got some problems. When I add -v tag, I can run the script. However, if I only use -q -a , there is error:
('https://class.coursera.org/algs4partII-007/', 'algs4partII-007') Traceback (most recent call last): File "dl_all.py", line 282, in
session = webdriver.Firefox()
File "/Users/Doodle/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 81, in init
self.binary, timeout)
File "/Users/Doodle/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in init
self.binary.launch_browser(self.profile, timeout=timeout)
File "/Users/Doodle/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 67, in launch_browser
self._start_from_profile_path(self.profile.path)
File "/Users/Doodle/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 90, in _start_from_profile_path
env=self._firefox_env)
File "/Users/Doodle/anaconda/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/Users/Doodle/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
Could you help me?