title: How to extract attached credentials from a url?
body: <p>In a URL like this: 
  <code>'https://usertest:userpass@localhost:8080/mypath'</code>. How do I extract the information such as username and password in python? For eg. the information I want to extract from the above URL would be <code>usertest</code> and <code>userpass</code>. I could extract these attached web credentials such as username and password using regex, but that seems to be a bit complicated and I am hoping if there is already a built-in solution for this. Any suggestion?</p>