On this page
article
Parse URL
Extract components from URLs.
Category: urllib
Problem
Extract components from URLs.
Solution
parsed = urlparse(url); qs = parse_qs(parsed.query)
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path