title: Build a URL using Python requests library
body: <p>I have a base URL.</p>
  
  <pre><code>BASE_URL = 'https://api.github.com/licenses'
  </code></pre>
  
  <p>I want to create a new url based on a search term(Ex - mit) appended to the base URL.</p>
  
  <pre><code>NEW_URL = 'https://api.github.com/licenses/mit'
  </code></pre>
  
  <p>I am using requests library to build and call the URLs as shown below.</p>
  
  <pre><code>from requests.compat import urljoin
  
  base_url = 'https://api.github.com/licenses'
  new_url = urljoin(base_url, 'mit')
  print new_url
  </code></pre>
  
  <p>But when I print the new_url, it messes up the URL.</p>
  
  <pre><code>https://api.github.com/mit
  </code></pre>
  
  <p>I am not sure how to fix this issue.</p>