title: Python Requests getting ('Connection aborted.', BadStatusLine("''",)) error
body: <pre><code>def download_torrent(url):
      fname = os.getcwd() + '/' + url.split('title=')[-1] + '.torrent'
      try:
          schema = ('http:')
          r = requests.get(schema + url, stream=True)
          with open(fname, 'wb') as f:
              for chunk in r.iter_content(chunk_size=1024):
                  if chunk:
                      f.write(chunk)
                      f.flush()
      except requests.exceptions.RequestException as e:
          print('\n' + OutColors.LR + str(e))
          sys.exit(1)
  
      return fname
  </code></pre>
  
  <p>In that block of code I am getting an error when I run the full script. When I go to actually download the torrent, I get:</p>
  
  <pre><code>('Connection aborted.', BadStatusLine("''",))
  </code></pre>
  
  <p>I only posted the block of code that I think is relevant above. The entire script is below. It's from  pantuts, but I  don't think it's maintained any longer, and I  am  trying to get it running  with python3. From my research, the error might mean I'm using http instead of https, but I have tried both.</p>
  
  <p><a href="https://github.com/pantuts/asskick/blob/master/asskick.py" rel="noreferrer">Original script</a></p>