Sahih al-Bukhari 3381
Book 60: Prophets · Narrated by Ibn `Umar
Arabic
حَدَّثَنِي عَبْدُ اللَّهِ، حَدَّثَنَا وَهْبٌ، حَدَّثَنَا أَبِي، سَمِعْتُ يُونُسَ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، أَنَّ ابْنَ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلاَّ أَنْ تَكُونُوا بَاكِينَ، أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ ".
English translation
Narrated Ibn `Umar:Allah's Messenger (ﷺ) said, "Do not enter the ruined dwellings of those who were unjust to themselves unless (you enter) weeping, lest you should suffer the same punishment as was inflicted upon them
Reference: Sahih al-Bukhari 3381, Book of Prophets. English translation by Dr. Muhammad Muhsin Khan.