dumpster diving

Is Dumpster Diving Legal in Quincy?
I admit, way back in my college days, when I was young and stupid, I experimented with…dumpster diving. I’m not proud of it, but hey, free stuff, right?
So I got to wondering, is this lucrative and unsanitary practice legal in the state of Illinois?