title: Python video is not playing Downloaded by using requests module
body: <p>I'm working on a Python(3.6) &amp; Django(2) project in which I need to download a video from a URL.
  Here's what I have tried:</p>
  
  <p><strong>from views.py:</strong></p>
  
  <pre><code>    if validation is True:
          url = request.POST.get('video_url')
          r = requests.get(url, allow_redirects=True)
          file = open('my_video.mp4', 'wb').write(r.content)
          rea_response = HttpResponse(file, content_type='video/mp4')
          rea_response['Content-Disposition'] = 'attachment; filename=my_video.mp4'
          return rea_response
  </code></pre>
  
  <p>The URL from where it's downloading the vide is:</p>
  
  <blockquote>
    <p><a href="https://expirebox.com/files/386713962c5f8b7556bc77c4a6c2a576.mp4" rel="nofollow noreferrer">https://expirebox.com/files/386713962c5f8b7556bc77c4a6c2a576.mp4</a></p>
  </blockquote>
  
  <p>It downloads a file with the name as <code>my_video.mp4</code> but when I try to open this video it's not playing.</p>
  
  <p>What can be wrong here with my code?
  OR is there any better way to download the video from URL.</p>