回答編集履歴

1

記入ミスのため

2019/11/23 16:21

投稿

Reach
Reach

スコア735

test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  from multiprocessing import Pool
12
12
 
13
- import requests
13
+
14
14
 
15
15
  #import chromedriver_binary
16
16
 
@@ -20,11 +20,7 @@
20
20
 
21
21
  options = Options()
22
22
 
23
- #options.add_argument('--headless')
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(3) as p:
65
+ with Pool(9) as p:
70
66
 
71
67
  result = (p.map(fetchclass, urls))
72
68
 
73
- #sys.stdout.buffer.write(result.encode('utf-8'))
69
+ for l in result:
74
70
 
71
+ sys.stdout.buffer.write(l.encode('utf-8'))
72
+
75
- print(result)
73
+ #print(l)
74
+
75
+
76
76
 
77
77
  ```