質問編集履歴

3

文法の修正

2023/03/21 08:40

投稿

spot_0104
spot_0104

スコア5

test CHANGED
File without changes
test CHANGED
@@ -23,8 +23,10 @@
23
23
 
24
24
  #画像の保存場所
25
25
  from pathlib import Path
26
- out_folder = Path('download')
26
+ dst_path = Path('img')
27
- out_folder.mkdir(exist_ok=True)
27
+ dst_path.mkdir(exist_ok=True)
28
+ dst_path = Path('img/pokemon')
29
+ dst_path.mkdir(exist_ok=True)
28
30
  download_dir = 'download/pokemon'
29
31
 
30
32
  #ユーザーエージェント設定(コピペOK)

2

文法の修正

2023/03/21 08:05

投稿

spot_0104
spot_0104

スコア5

test CHANGED
File without changes
test CHANGED
@@ -76,7 +76,7 @@
76
76
  box_start = number.index('detail/')
77
77
 
78
78
  #終了位置
79
- box_end = number.index('.html')
79
+ box_end = number.index('.htm')
80
80
 
81
81
  number = number[box_start+7:box_end-1]
82
82
 
@@ -112,7 +112,7 @@
112
112
  Cell In[12], line 63
113
113
  60 box_start = number.index('detail/')
114
114
  62 #終了位置
115
- ---> 63 box_end = number.index('.html')
115
+ ---> 63 box_end = number.index('.htm')
116
116
  65 number = number[box_start+7:box_end-1]
117
117
  67 #名前を取得
118
118
 

1

誤字

2023/03/21 07:53

投稿

spot_0104
spot_0104

スコア5

test CHANGED
@@ -1 +1 @@
1
- ValueError: substring not found の解決方法を知りたいです
1
+ ValueError: substring not found の解決方法を知りたい
test CHANGED
@@ -107,9 +107,6 @@
107
107
 
108
108
  ### 発生している問題・エラーメッセージ
109
109
 
110
- エラーメッセージ
111
- ```python
112
-
113
110
  ---------------------------------------------------------------------------
114
111
  ValueError Traceback (most recent call last)
115
112
  Cell In[12], line 63