In this paper, we introduce a method for analysing wastewater from the leather industry with a specific focus on determining the Chemical Oxygen Demand parameter, which plays a vital role in evaluating water pollution levels. Conventional methods for measuring it involve extensive laboratory analysis, sample preparation, and the usage of hazardous substances. To overcome these limitations, we propose a machine learning-based approach that employs nonspecific sensors and soft sensing techniques to derive indicators of wastewater quality. Our method leverages ultraviolet and visible spectroscopy measurements, which provide valuable insights into the light absorption characteristics of the wastewater sample, enabling us to estimate Chemical Oxygen Demand. Importantly, our approach includes an analysis of the input wavelengths, allowing us to identify the spectra for accurate Chemical Oxygen Demand estimation. Once deployed, our method offers the potential for real-time monitoring systems of wastewater in leather production contexts, by eliminating the need for timeconsuming laboratory analyses.