Crude oil spill is difficult to deal with and still a global challenge due to its high viscosity. Developing foams with excellent mechanical properties, photothermal effect and Joule heating effect simultaneously to achieve crude oil all-weather recovery is desirable. Here, 3D porous foams were successfully fabricated by the composite of polydimethylsiloxane (PDMS) and multi-walled carbon nanotubes (MWCNT) by a combination of sacrificial template method and laser etching treatment. Benefiting from the low surface energy of PDMS itself and the micro-nano structures constructed in the preparation, the obtained foams exhibit excellent superhydrophobic and superoleophilic properties (WCA of 157° and OCA of 0°). Significantly, MWCNT do not exist as a coating around the foam surface, but as the main component constituting the foam skeleton, so the foam shows excellent mechanical property, low temperature resistance, high temperature resistance, salt resistance and abrasion resistance. Moreover, taking the advantage of the addition of MWCNT, the foam shows excellent photothermal effect requiring 1 sun irradiation to attain a temperature of 60.7 ℃ after 4 min and a stable temperature of 71.6 ℃ after 10 min, and Joule heating effect requiring only 9 V voltage to attain a temperature of 64.5 ℃ after 1.5 min and a stable temperature of 91.1 ℃ after 10 min, respectively. Besides low viscosity oil–water separation, it can achieve rapid crude oil spill recovery under the photothermal effect or Joule heating effect. The combination of the two effects can realize the coupling effect and achieve high-efficiency all-weather high viscosity crude oil recovery, thus making the foam more practical. This foam is expected to be an ideal material for all-weather dealing with oil spills.