回答編集履歴
1
encoding="utf_8_sig"を忘れてました
test
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
table class="data-table5"のtrを一行ずつ抽出、thかtdのテキストを抽出
|
2
|
-
|
3
|
-
|
4
2
|
|
5
3
|
|
6
4
|
|
@@ -36,11 +34,9 @@
|
|
36
34
|
|
37
35
|
|
38
36
|
|
39
|
-
with open("result.csv", "w") as fw:
|
37
|
+
with open("result.csv", "w", encoding="utf_8_sig") as fw:
|
40
38
|
|
41
39
|
writer = csv.writer(fw, dialect="excel", lineterminator="\n")
|
42
|
-
|
43
|
-
|
44
40
|
|
45
41
|
writer.writerows(result)
|
46
42
|
|