Proxy error

I was getting an error when Photini tried to set my network proxy. 
`ValueError: invalid literal for int() with base 10: '3128/'`
It was picking up the trailing slash at the end. I did some research and found [urlparse](https://docs.python.org/2/library/urlparse.html). It seems to be just what's needed here. 

This is my first pull request, so be gentle if there are any problems.