How do I repair a bedside Lamp?
Lamp repair is very sensitive to the value of the lamp to you - buying a new lamp or a new-to-you used lamp can often be cheaper than new repair parts, much less assigning a value to your labor. Of course, some new lamps are junk quality brand-new, so...

One method that can work is to transfer parts from a yard sale/thrift-shop lamp, if you find one with the electrical parts in good shape but unloved and low priced for other reasons, like being terminally ugly. 

Having been tearing the things apart and putting them together for decades, starting when I was a kid, I'm a lousy source for "how to websites" and I'll let someone who came to it later take a stab at that part.