ספר המדות Improper Thoughts / Part II · טו
Sefer HaMiddot 807
טו. בְּעִיר שֶׁיֵּשׁ שָׁם יְרִידִים וְיוֹמָא דְּשׁוּקָא גְּדוֹלִים, שָׁם הִרְהוּרֵי עֲבוֹדָה זָרָה בְּיוֹתֵר, וְהַסְּגֻלָּה לָזֶה שֶׁיַּעֲסֹק בְּיוֹמָא דְּשׁוּקָא בַּתּוֹרָה, וְלא יָבוֹאוּ לוֹ הִרְהוּרֵי עֲבוֹדָה זָרָה.
15. In a city that has fairs and big market days, there [you will find] many thoughts of idol worship. A segula for this is to toil in Torah on market days, and thoughts of idol worship will not come to him.