Measuring Waterlevel

Hello, I am doing a school project and need to continuously measure the level of water in a cup. I am currently using the cheap water sensor (tall, red, copper sensor), but after an hour or so the sensor starts breaking as it is copper inside of water. It is the perfect size that I need but it obviously does not work after a few uses. Is there another sensor I can get that would last longer? If someone could help me rather soon, as my project is due in a week, I would greatly appriciate it. Thank you in advance.

Maybe some ideas here. People have used ultrasonic sensors also for this.

Thank you for the quick reply! I'll look into using an ultrasonic sensor.

Do post a link to the sensor you use now.