回答編集履歴
2
あ
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
cassetteitem_content-title:物件名
|
6
6
|
cassetteitem_detail-col1:住所
|
7
|
-
cassetteitem_detail-col2:場所
|
7
|
+
cassetteitem_detail-col2:~~場所~~アクセス
|
8
8
|
cassetteitem_detail-col3:築年数
|
9
9
|
|
10
10
|
という明細が繰り返されてるだけみたいだから、下のコードでとれるはず。
|
1
w
test
CHANGED
@@ -24,13 +24,11 @@
|
|
24
24
|
|
25
25
|
contents = soup.find_all('div', class_='cassetteitem')
|
26
26
|
|
27
|
-
# content = contents[2]
|
28
27
|
|
29
28
|
for i,content in enumerate(contents):
|
30
29
|
print(i+1)
|
31
30
|
try:
|
32
|
-
|
31
|
+
|
33
|
-
# detail = content.find('div', class_='cassetteitem-detail')
|
34
32
|
# 物件名
|
35
33
|
title = content.find('div', class_='cassetteitem_content-title').text
|
36
34
|
# 住所
|