Skip to content

tedious ramblings

The blog of Robert Hafner

Menu
  • Projects
  • Resume
  • About
Menu

urlparser – a simple python program for extracting info from URLs

Posted on October 13, 2018October 12, 2018 by Robert Hafner

I regularly run into the need to use part of a URL inside of shell scripts- such as extracting the hostname and port from a URL in order to check if the service is reachable- and got a bit tired of screwing with regex. The urllib python library’s parse component is a great tool for managing this, so I wrote urlparser to expose that library directly from the command line and tossed it up on pypi for others to use.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • More
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to email this to a friend (Opens in new window)
  • Click to print (Opens in new window)

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About

A place for me to rant about various development projects, random server weirdness, the eclectic world that is the bay area, what I had for lunch, and any other topic that comes to mind.

Follow Me

Follow Us on TwitterFollow Us on LinkedInFollow Us on Github

Popular Posts

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

©2021 tedious ramblings | Built using WordPress and Responsive Blogily theme by Superb
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.