Skip to content

tedious ramblings

The blog of Robert Hafner

Menu
  • Projects
  • Resume
  • Sponsor
  • Archives
  • 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 Mastodon (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to print (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 a link to a friend (Opens in new window)

Leave a Reply Cancel reply

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

About

Robert Hafner is a Principal Engineer based in Chicago focusing on distributed applications, infrastructure, and security. This blog is a running journal of projects, tutorials, and random ideas that pop into his head.

  • GitHub
  • Mastodon
  • LinkedIn

Popular Posts

  • Using Github Actions OpenID Connect to push to AWS ECR without Credentials
  • JShrink reaches over 21,000,000 installs and releases v1.6!
  • Rob’s Awesome Python Template
  • Getting AWS ECS to work on Ubuntu with Full GPU Support
  • A Walkthrough of PSR-6: Caching
  • Building an Email Testing Environment with Vagrant, Dovecot and Travis-CI
  • Multi-Py: Multiplatform Container Images for Python Packages
  • Telling OpenSSH to Pull Keys from Github with AuthorizedKeysCommand
  • Introducing DapperData for Formatting YAML and JSON
  • Simple Multiprocessing with QuasiQueue

Subscribe to Blog via Email

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

©2023 tedious ramblings | Built using WordPress and Responsive Blogily theme by Superb