質問編集履歴

2

HTML構造イメージを追加

2023/06/10 09:57

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -54,3 +54,5 @@
54
54
 
55
55
  print(title, address, access, age)
56
56
  ```
57
+ HTML構造
58
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-10/ed6cde06-250b-41d4-b9a4-52b6df7e8f62.png)

1

コードに.textが抜けていたため追記

2023/06/10 09:54

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -50,7 +50,7 @@
50
50
  # 場所
51
51
  access = detail.find('li', class_='cassetteitem_detail-col2').text
52
52
  # 築年数
53
- age = detail.find('li', class_='cassetteitem_detail-col3')
53
+ age = detail.find('li', class_='cassetteitem_detail-col3').text
54
54
 
55
55
  print(title, address, access, age)
56
56
  ```