Installing OS X not from App Store
You have installed Yosemite before, look in the AppStore whether Yosemite is in your purchased items. This is one Option to install Yosemite and upgrade to El Capitan.

You can download El Capitan with this direct link from App Store. But I'm not sure whether this link work for you, try it. 
Cannot offer other download links because many sites where you can download this are not clear trusted sites.

Third Option, went to next appstore or similar Mac shop and get a copy of El Capitan if possible. You have also the option to contact the Apple Support.