質問編集履歴
1
エラー内容の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
例外処理をしてみましたが駄目でした。
|
8
8
|
|
9
9
|
find.allで見つからなかった場合の処理はどのようにすればいいですか?
|
10
|
-
|
10
|
+
```ここに言語を入力
|
11
11
|
import requests
|
12
12
|
from bs4 import BeautifulSoup
|
13
13
|
|
@@ -33,4 +33,10 @@
|
|
33
33
|
chap3 = soup2.find_all(class_="tk-pd-HeroTitle")
|
34
34
|
print(chap3)
|
35
35
|
except:
|
36
|
-
print("エラー")
|
36
|
+
print("エラー")
|
37
|
+
```
|
38
|
+
|
39
|
+
#エラー内容
|
40
|
+
|
41
|
+
|
42
|
+
ConnectionError: HTTPSConnectionPool(host='takeda-kenko.jphttps', port=443): Max retries exceeded with url: //shop.takeda.co.jp/p/92901 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x00000258331DFC50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
|