Skip to main content

A simple command-line utility for parsing URLs.

Project description

# urlp A simple command-line utility for parsing URLs, written in Python. Inspired by [urlp](https://github.com/clayallsopp/urlp).

`bash $ urlp --part=host "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" audience.cnn.com $ urlp --part=registered_domain "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" cnn.com $ urlp --part=path "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" /services/activatealert.jsp $ urlp --part=path --path_index=0 "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" services $ urlp --part=query "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" source=cnn&id=203&value=hurricane+isabel $ urlp --part=query --query_field=source "http://audience.cnn.com/services/activatealert.jsp?source=cnn&id=203&value=hurricane+isabel" cnn ` urlp often works together with other unix command-line tools. For example: * Find all hosts in urls, sorted by count. `bash cat urlfile | urlp --part=host | sort | uniq -c | sort -nr -k1,1 ` * Find all url path words (separated by “/”), sorted by count. `bash cat urlfile | urlp --part=path | tr / \\n | awk '$1!=""' | sort | uniq -c | sort -nr -k1,1 `

## Install ` pip install urlp `

Project details


Download files

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

Source Distribution

urlp-0.0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

urlp-0.0.1-py2.py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page