Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:9176Abū al-Ḥusayn > ʿAbdullāh > Yaʿqūb > Ibn Bashhār > ʿAbd al-Raḥman / Ibn Mahdī > Sufyān > Manṣūr > Mujāhid

[Machine] To expose oneself to the mention of women while being prohibited, this is what Yahya al-Qattan and a group have also said. Only Allah knows best.  

البيهقي:٩١٧٦وَأَخْبَرَنَا أَبُو الْحُسَيْنِ أنبأ عَبْدُ اللهِ ثنا يَعْقُوبُ ثنا ابْنُ بَشَّارٍ ثنا عَبْدُ الرَّحْمَنِ يَعْنِي ابْنَ مَهْدِيٍّ ثنا سُفْيَانُ عَنْ مَنْصُورٍ عَنْ مُجَاهِدٍ قَالَ كَانَ ابْنُ عُمَرَ يَنْهَى

أَنْ يُعَرِّضَ الْحَادِي بِذِكْرِ النِّسَاءِ وَهُوَ مُحْرِمٌ وَكَذَلِكَ قَالَهُ يَحْيَى الْقَطَّانُ وَجَمَاعَةٌ فَاللهُ أَعْلَمُ