Purana Jyotisha Sangraha · by Vyasa
Chapter 8 · Dreams and Eclipse Rules
ब्रह्मवैवर्तपुराणम् : शुभाशुभस्वप्नाः ग्रहणनियमाश्च
राहुग्रस्तं रविं सोमं न पश्यन्ति विपश्चितः ।जन्माष्टसप्तरिःफाङ्कदशमस्थे दिवाकरे ॥ ५६ ॥
From the Brahmavaivarta Purana, print Krishna-janma Khanda ch 78, verse 56.
The wise do not look at the Sun or the Moon when Rahu holds them. Nor when the Sun is in the birth sign or the 8th, 7th, 12th, 9th or 10th from it.
Simple meaning: The wise avoid looking at an eclipse, especially when the Sun is in certain houses from the birth sign.
जन्मर्क्षे निधनं चापि चतुर्थेऽपि कलानिधौ ।
The text lists times when the Moon should not be looked at, such as the 4th moon day of Bhadra.
चन्द्रस्तारापहरणं कलङ्कमतिदुष्करम् ।
Looking at the Moon on that day on purpose is said to bring a stain on one's name.
अकामतो नरो दृष्ट्वा मन्त्रपूतं जलं पिबेत् ।
One who saw it by accident is said to be cleansed by drinking chant-blessed water.