How to simplify this mass of similar ifs
<p>I am trying to figure out how to simplify this piece of code. The logic for every if condition is basically the same so I want to get rid of the duplicate ifs:</p>

<pre><code>      if "video_codec" in profile:
          self.video_codec = profile["video_codec"]
      if "resolution_width" in profile:
          self.resolution_width = profile["resolution_width"]
      if "resolution_height" in profile:
          self.resolution_height = profile["resolution_height"]
      if "ratio" in profile:
          self.ratio = profile["ratio"]
      if "video_bitrate" in profile:
          self.video_bitrate = profile["video_bitrate"]
      if "profile" in profile:
          self.profile = profile["profile"]
      if "audio_codec" in profile:
          self.audio_codec = profile["audio_codec"]
      if "audio_channels" in profile:
          self.audio_channels = profile["audio_channels"]
      if "audio_bitrate" in profile:
          self.audio_bitrate = profile["audio_bitrate"]
</code></pre>

<p>I hope this can be done in 3-4 lines instead of my 18 lines.</p>
