urlparse3 is simple and powerful url parsing tool
Project description
urlparse3
Urlparse3 is simple and powerful url parsing tool. Example:
import urlparse3 url = 'http://admin:secret@domain.com/path?q=123#anchor' parsed_url = urlparse3.parse_url(url) print parsed_url.scheme # http print parsed_url.username # admin print parsed_url.password # secret print parsed_url.domain # domain.com print parsed_url.path # path # query is converted into dictionary print parsed_url.query # {'q': '123'} print parsed_url.fragment # anchor # now add new GET parameter parsed_url['name'] = 'alex' # and get url back to string representation print parsed_url.geturl() # http://admin:secret@domain.com/path?q=123&name=alex#anchor
Changes:
Version 1.0.4. Fix parsing url path with slashes
Version 1.0.5. Fix parsing url query with slashes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
urlparse3-1.0.5.tar.gz
(3.4 kB
view details)
File details
Details for the file urlparse3-1.0.5.tar.gz
.
File metadata
- Download URL: urlparse3-1.0.5.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd8c3407f1897dfabeb9a637221f3bd049aca01c0da9fbcb464a20327885fb5e |
|
MD5 | 0155e8ea2feee6eba761fe060a9845f8 |
|
BLAKE2b-256 | 506e4bb5574cb8c4b576702a742ceb9b25a056e7d78e33926a1847aa3cc92fb5 |