title: Python Requests Proxy error 'Failed to parse'
body: <p>I'm trying to scrape a page using a list of proxies.
  This small problem is litrally driving me nuts. It works when i input the proxy directly like this:</p>
  
  <pre><code>proxies = {
              'http': 'http://10.0.1.1:8080',
              'https': 'http://10.0.1.1:8080'
          }
  </code></pre>
  
  <p>But when i use something like </p>
  
  <pre><code>http_proxy =  'http://'+proxy
  https_proxy = 'https://'+proxy
  
  
  
      proxies = {
              'http': http_proxy,
              'https': https_proxy,
          }
  </code></pre>
  
  <blockquote>
    <p>requests.packages.urllib3.exceptions.LocationParseError: Failed to
    parse: 10.0.1.1:8080</p>
  </blockquote>
  
  <p>I get this error. This makes absolutely no sense. </p>
  
  <p>Edit: i just realized its probably because of the newline after each proxy i have the proxylist.txt hosted on a server so now i need to find out how to get rid of the newline after each proxy i tried stuff like proxy.strip('\n') but that didn't work either</p>