質問編集履歴
1
コード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,6 +22,34 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
+
# コード
|
26
|
+
|
27
|
+
```Python
|
28
|
+
|
29
|
+
def _create_options(self, proxy_settings=None) -> webdriver.ChromeOptions:
|
30
|
+
|
31
|
+
options = self.config["browser"]["chrome"]["options"]
|
32
|
+
|
33
|
+
chrome_options = webdriver.ChromeOptions()
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
for conf in options:
|
38
|
+
|
39
|
+
chrome_options.add_argument(conf)
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
chrome_options.add_argument(f"--proxy-server=http://{proxy_settings['proxy_host']}:{proxy_settings['proxy_port']}")
|
44
|
+
|
45
|
+
chrome_options.add_argument(f"--proxy-auth={proxy_settings['proxy_username']}:{proxy_settings['proxy_password']}")
|
46
|
+
|
47
|
+
return chrome_options
|
48
|
+
|
49
|
+
```
|
50
|
+
|
51
|
+
|
52
|
+
|
25
53
|
## バージョン情報
|
26
54
|
|
27
55
|
- Python: 3.7.4
|