Get a VPN. Don’t use public wifi without a vpn. Using public wifi without a VPN is like having sex with random hookups without a condom.
Another alternative would be to download your anime of choice before hand and keep it on your device to watch. You could even store it on say google drive or something as they don’t pay much attention to the content of videos unless you upload them to youtube. If you need to you can pay the $30 a year and get the cheap premium package for 0.1TB Which isn’t that bad all things considered if you just use it to store files in transit.
Rule of thumb? You can’t. There is always a risk of malware. Best is to up your computer security with a good set of antivirus, antimalware and a VPN.