回答編集履歴
1
記入ミスのため
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
from multiprocessing import Pool
|
12
12
|
|
13
|
-
|
13
|
+
|
14
14
|
|
15
15
|
#import chromedriver_binary
|
16
16
|
|
@@ -20,11 +20,7 @@
|
|
20
20
|
|
21
21
|
options = Options()
|
22
22
|
|
23
|
-
|
23
|
+
options.add_argument('--headless')
|
24
|
-
|
25
|
-
options.add_experimental_option("excludeSwitches", ['enable-automation'])
|
26
|
-
|
27
|
-
options.add_experimental_option('useAutomationExtension', False)
|
28
24
|
|
29
25
|
driver = webdriver.Chrome(options=options)
|
30
26
|
|
@@ -66,12 +62,16 @@
|
|
66
62
|
|
67
63
|
|
68
64
|
|
69
|
-
with Pool(
|
65
|
+
with Pool(9) as p:
|
70
66
|
|
71
67
|
result = (p.map(fetchclass, urls))
|
72
68
|
|
73
|
-
|
69
|
+
for l in result:
|
74
70
|
|
71
|
+
sys.stdout.buffer.write(l.encode('utf-8'))
|
72
|
+
|
75
|
-
print(
|
73
|
+
#print(l)
|
74
|
+
|
75
|
+
|
76
76
|
|
77
77
|
```
|