Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/URL-parser/Python/url-parser.py
Normal file
14
Task/URL-parser/Python/url-parser.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import urllib.parse as up # urlparse for Python v2
|
||||
|
||||
url = up.urlparse('http://user:pass@example.com:8081/path/file.html;params?query1=1#fragment')
|
||||
|
||||
print('url.scheme = ', url.scheme)
|
||||
print('url.netloc = ', url.netloc)
|
||||
print('url.hostname = ', url.hostname)
|
||||
print('url.port = ', url.port)
|
||||
print('url.path = ', url.path)
|
||||
print('url.params = ', url.params)
|
||||
print('url.query = ', url.query)
|
||||
print('url.fragment = ', url.fragment)
|
||||
print('url.username = ', url.username)
|
||||
print('url.password = ', url.password)
|
||||
Loading…
Add table
Add a link
Reference in a new issue