質問編集履歴
3
あ
test
CHANGED
File without changes
|
test
CHANGED
@@ -181,3 +181,35 @@
|
|
181
181
|
```
|
182
182
|
|
183
183
|
というエラーになり、やはりうまくいかないです。
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
chromediverを開いてみたら
|
192
|
+
|
193
|
+
```ここに言語を入力
|
194
|
+
|
195
|
+
Only local connections are allowed.
|
196
|
+
|
197
|
+
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
|
198
|
+
|
199
|
+
[1558411773.099][SEVERE]: bind() failed: Address already in use (48)
|
200
|
+
|
201
|
+
IPv4 port not available.
|
202
|
+
|
203
|
+
```
|
204
|
+
|
205
|
+
と書かれており、IPv4 port not availableを検索してみたら、
|
206
|
+
|
207
|
+
https://yuichon.com/2019/03/ruby-commanderror/のBlogを見つけました。
|
208
|
+
|
209
|
+
もしかして自分も適当にchrome driverを配置した原因で、binがおかしくなったのかなと思いましたが、
|
210
|
+
|
211
|
+
ターミナルでpython -Vはしっかりと動きました。
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
IPv4 port not availableは関係あるでしょうか?
|
2
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -115,3 +115,69 @@
|
|
115
115
|
以上です。
|
116
116
|
|
117
117
|
よろしくお願いいたします。
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
追記
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
```ここに言語を入力
|
138
|
+
|
139
|
+
driver = webdriver.Chrome('/Users/aaa/scraping/chromedriver')
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
に変更したところ
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
```ここに言語を入力
|
148
|
+
|
149
|
+
Traceback (most recent call last):
|
150
|
+
|
151
|
+
File "a.py", line 4, in <module>
|
152
|
+
|
153
|
+
driver = webdriver.Chrome('/Users/aaa/scraping/chromedriver')
|
154
|
+
|
155
|
+
File "/Users/aaa/scraping/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
|
156
|
+
|
157
|
+
desired_capabilities=desired_capabilities)
|
158
|
+
|
159
|
+
File "/Users/aaa/scraping/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
|
160
|
+
|
161
|
+
self.start_session(capabilities, browser_profile)
|
162
|
+
|
163
|
+
File "/Users/aaa/scraping/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
|
164
|
+
|
165
|
+
response = self.execute(Command.NEW_SESSION, parameters)
|
166
|
+
|
167
|
+
File "/Users/aaa/scraping/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
|
168
|
+
|
169
|
+
self.error_handler.check_response(response)
|
170
|
+
|
171
|
+
File "/Users/aaa/scraping/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
|
172
|
+
|
173
|
+
raise exception_class(message, screen, stacktrace)
|
174
|
+
|
175
|
+
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
|
176
|
+
|
177
|
+
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.4 x86_64)
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
```
|
182
|
+
|
183
|
+
というエラーになり、やはりうまくいかないです。
|
1
あ
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
seleniumでchromeを動かしたい
|
1
|
+
seleniumでchromeを動かしたい chrome driverがうまく動かない
|
test
CHANGED
File without changes
|