There is a reason I never buy carbonated beverages in 1 or 2-liter bottles: they always go flat before I can finish them. Once a bottle has been opened and there is some volume of air in the bottle it doesn't matter how tightly you seal the bottle, the carbonation comes out of the solution. Keeping the air in the space at a higher pressure prevents this and can be achieved with a tire valve and bicycle pump.
I must say that I didn't come up with this idea. I actually saw a cheap plastic device at a supermarket which replaces the cap on a bottle and allows one to pressurize the bottle. Unfortunately, this device only lasted for a few uses before flying apart. I liked the idea, so decided to make own higher-quality device.
This is about a 5-minute project. All you need is a brand new stainless steel tire valve-stem, a cap from a bottle, and a simple hand pump. It may be possible to use a rubber valve-stem, but I didn't try it. Rubber valve-stems don't usually have a nut to clamp them down, so I wouldn't recommend them. I ordered the valve-stem from an eBay seller for about $5 (package of four). Get a new one--you don't want to bother with road crud from a used one getting in your beverage.
All you need to do is drill an appropriate sized hole in the cap for the valve-stem to fit through and then clamp the valve-stem in place. The plastic typically used for caps is very flexible, so it can be a bit frustrating to drill. I used a drill press with a wooden block under the plastic for support. You don't need a very precise hole because the rubber grommet at the base of the valve-stem will seal most imperfections.
After you've made the cap, simple replace the cap on any newly opened bottle and pump it up with the bicycle pump. You can get an idea of how much pressure is in the bottle by squeezing it. DO NOT use an electric pump--your bottle will likely explode before you can shut the pump off and will make a giant mess. More importantly, you don't want to be putting any oil or particles from an electric pump into your drink! It doesn't take long with a manual pump.