質問編集履歴
5
追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -160,7 +160,33 @@
|
|
160
160
|
|
161
161
|
関数なしでコードを書きましたがそちらでも詰まってしまいました。
|
162
162
|
|
163
|
+
```ここに言語を入力
|
163
164
|
|
165
|
+
def inda(ta, date):
|
166
|
+
|
167
|
+
insert = 'insert into {} (we, date) values (?,?);'.format(ta, date)
|
168
|
+
|
169
|
+
print(insert)
|
170
|
+
|
171
|
+
print(date)
|
172
|
+
|
173
|
+
c.execute(insert, date)
|
174
|
+
|
175
|
+
conn.commit()
|
176
|
+
|
177
|
+
```
|
178
|
+
|
179
|
+
この関数の中の
|
180
|
+
|
181
|
+
c.execute(insert, date)
|
182
|
+
|
183
|
+
の前に
|
184
|
+
|
185
|
+
print(insert)
|
186
|
+
|
187
|
+
print(date)
|
188
|
+
|
189
|
+
こちらを出力しましたが同じエラーが出てしまいした。。。
|
164
190
|
|
165
191
|
|
166
192
|
|
4
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,9 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
-
```
|
35
|
+
```
|
36
|
+
|
37
|
+
```
|
36
38
|
|
37
39
|
from selenium import webdriver
|
38
40
|
|
@@ -140,13 +142,13 @@
|
|
140
142
|
|
141
143
|
inda(tab, test)
|
142
144
|
|
143
|
-
```
|
144
145
|
|
145
146
|
|
146
147
|
|
147
148
|
|
149
|
+
```
|
148
150
|
|
149
|
-
```
|
151
|
+
```
|
150
152
|
|
151
153
|
Python sqlite3
|
152
154
|
|
3
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,13 +18,17 @@
|
|
18
18
|
|
19
19
|
```
|
20
20
|
|
21
|
-
|
21
|
+
Traceback (most recent call last):
|
22
22
|
|
23
|
+
File "/Users/uu/Pycha/so/sample.py", line 50, in <module>
|
24
|
+
|
25
|
+
insert_data(table_create, test)
|
26
|
+
|
27
|
+
File "/Users/uu/Pycha/so/sample.py", line 41, in insert_data
|
28
|
+
|
23
|
-
c.execute(insert, date)
|
29
|
+
c.execute(insert, date)
|
24
30
|
|
25
31
|
sqlite3.OperationalError: near "<": syntax error
|
26
|
-
|
27
|
-
```
|
28
32
|
|
29
33
|
|
30
34
|
|
2
文法の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,6 +17,10 @@
|
|
17
17
|
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
insert_data(table_create, test)
|
22
|
+
|
23
|
+
c.execute(insert, date)
|
20
24
|
|
21
25
|
sqlite3.OperationalError: near "<": syntax error
|
22
26
|
|
1
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,17 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
```ここに言語を入力
|
28
|
+
|
29
|
+
from selenium import webdriver
|
30
|
+
|
31
|
+
import chromedriver_binary
|
32
|
+
|
33
|
+
from selenium.webdriver.common.keys import Keys
|
34
|
+
|
35
|
+
from selenium.webdriver.chrome.options import Options
|
36
|
+
|
27
|
-
import
|
37
|
+
import sqlite3
|
28
38
|
|
29
39
|
|
30
40
|
|
@@ -122,6 +132,8 @@
|
|
122
132
|
|
123
133
|
inda(tab, test)
|
124
134
|
|
135
|
+
```
|
136
|
+
|
125
137
|
|
126
138
|
|
127
139
|
|