回答編集履歴
2
リンク修正
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
上記の~.pyファイルと同じフォルダにtemplateフォルダを作り、その中にindex.htmlとlayout.htmlを作成していないからではないでしょうか。
|
6
6
|
|
7
|
-
(index.htmlの中身は[ここ](https://github.com/alumi-mic/flasksample-hatebu/blob/master/templates/
|
7
|
+
(index.htmlの中身は[ここ](https://github.com/alumi-mic/flasksample-hatebu/blob/master/templates/index.html)、
|
8
8
|
|
9
9
|
layout.htmlの中身は[ここ](https://github.com/alumi-mic/flasksample-hatebu/blob/master/templates/layout.html)の通りになっている必要があります)
|
10
10
|
|
1
修正
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
あと、
|
13
|
+
あと、(templateフォルダおよびその中にindex.html、layout.htmlを作成したうえで)
|
14
14
|
|
15
15
|
title = div.h2 を soup.find('h2').get_text()
|
16
16
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
title = div.h3
|
20
20
|
|
21
|
-
とす
|
21
|
+
とすれば、元のAttributeError: 'NoneType' object has no attribute 'getText'エラーは
|
22
22
|
|
23
23
|
発生しなくなると思います。
|
24
24
|
|