回答編集履歴

2

修正2

2020/09/27 08:52

投稿

Reach
Reach

スコア735

test CHANGED
@@ -108,11 +108,15 @@
108
108
 
109
109
  print('Error processing')
110
110
 
111
+
112
+
111
113
  except Exception as e1:
112
114
 
113
- print(e1 + ' Occured')
115
+ print(str(e1) + ' Occured')
114
116
 
115
- sys.exit(1)
117
+ html = driver.page_source
118
+
119
+
116
120
 
117
121
  except Exception as e2:
118
122
 

1

修正

2020/09/27 08:52

投稿

Reach
Reach

スコア735

test CHANGED
@@ -74,11 +74,11 @@
74
74
 
75
75
 
76
76
 
77
- html = driver.page_source
77
+ html = ''
78
78
 
79
79
  try:
80
80
 
81
- soup = BeautifulSoup(html, "html.parser")
81
+ html = driver.page_source
82
82
 
83
83
  print('Normal processing')
84
84
 
@@ -104,7 +104,7 @@
104
104
 
105
105
 
106
106
 
107
- soup = BeautifulSoup(driver.page_source, "html.parser")
107
+ html = driver.page_source
108
108
 
109
109
  print('Error processing')
110
110
 
@@ -112,17 +112,19 @@
112
112
 
113
113
  print(e1 + ' Occured')
114
114
 
115
+ sys.exit(1)
116
+
115
117
  except Exception as e2:
116
118
 
117
119
  print(e2)
118
120
 
121
+ sys.exit(1)
119
122
 
120
123
 
121
124
 
125
+ soup = BeautifulSoup(html, "html.parser")
122
126
 
123
- print('Passed')
127
+ print('Passed')
124
-
125
-
126
128
 
127
129
 
128
130