Ibn 'Abbas (May Allah be pleased with them) said:
The Messenger of Allah (ﷺ) said, "He who acquires a branch of the knowledge of astrology, learns a branch of magic (of which he acquires more as long as) he continues to do so."[Abu Dawud].
App reference: Book 18, Hadith 161
Arabic/English book reference: Book 18, Hadith 1671