There is no export to MAL option on AniList, but a site already exists that allows you to do it.
https://malscraper.azurewebsites.net/
Ah RIP i didn't know this exists Lol. It was fun side project though.