I read that peppermint oil keeps them away so I bought a bottle of this stuff. Tried it on my cameras and it's worthless. Spiders come back after an hour or so.
The best way to do it is to buy a separate IR light and place it away from the camera then turn the built in IR light off. Spiders will be attracted to the other IR light and not your camera.