Created
August 22, 2017 07:32
-
-
Save kunpengku/1bfaf63c91db31c3eb5e4a459b0997ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [31]: url = 'http://www.baidu.com/a/b/c' | |
In [32]: d = dsnparse.parse(url) | |
In [33]: d | |
Out[33]: <dsnparse.ParseResult at 0x7f4a80fd99e8> | |
In [34]: d.path | |
Out[34]: '/a/b/c' | |
In [35]: d.host | |
Out[35]: 'www.baidu.com' | |
In [36]: d.port | |
In [37]: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment