Skip to main content

A simple command-line utility for parsing URLs.

Project description


A simple command-line utility for parsing URLs, written in Python. Inspired by urlp.

$ urlp --host ""
$ urlp --registered_domain ""
$ urlp --path ""
$ urlp --path -i 0 ""
$ urlp --query ""
$ urlp --query --query_field=s ""

urlp often works together with other unix command-line tools. For example:

  • Find all hosts in urls, sorted by count.
cat urlfile | urlp --host | sort | uniq -c | sort -nr -k1,1
  • Find all url path words (separated by "/"), sorted by count.
cat urlfile | urlp --path | tr / \\n | awk '$1!=""' | sort | uniq -c | sort -nr -k1,1


pip install urlp


$ urlp --help
usage: urlp [-h] [--host] [-p] [-i path_index] [-q] [-k query_field] [-r]
            [urls [urls ...]]

A command line url parser

positional arguments:
  urls                  URLs to parse

optional arguments:
  -h, --help            show this help message and exit
  --host                hostname
  -p, --path            Path
  -i path_index, --path_index path_index
                        filter parsed path by index
  -q, --query           query string
  -k query_field, --query_field query_field
                        value for the specified query field
  -r, --registered_domain
                        registered domain

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for urlp, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size urlp-0.0.3-py2.py3-none-any.whl (3.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size urlp-0.0.3.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page