Here is the Logitech webcam I am using to capture images from my telescope. I bought model E1000 which was only about 20 bucks at Walmart.
I removed the outer half cover (seen on the far right of the picture) and unscrewed the two halves (the screw hole can be seen on the webcam side) I removed the lens holder by removing the two screws that hold the lens holder then I removed the lens then replaced the lens holder which also keeps in place the ultraviolet filter.
I tried the web cam out on a Nikon biocular microscope. Her is an image of a spider, mag of about 20X, I found in my pool strainer. Below is the actual size of the spider.
The quality is not the best but you can see 4 of the 8 eyes. I also show how the web cam is attached to the eyepiece.