datum = soup.findAll('a', {'class': 'result-title'})
for data in datum:
print(data.text)
print(data.get('href'))
df = {'Title': data.text, 'Url': data.get('href')}
houseitems.append(df, ignore_index=True)
What is wrong with my Code? Why when I asked for my houseitems, it gives me empty data.
Empty DataFrame
Columns: [Title, Url, Price]
Index: []
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…