Using Ruby to manipulate URLs

There are a number of sites that lock links behind annoying ads. I usually just inspect the button on Chrome and cut off the query value that has the desired URL. Usually they come encoded in base64 or at least URL encoded, so you may need some third party website to convert these values for you.

To save me the trouble, I do the entire process in irb (the Ruby REPL). These are very simple steps, but help me a lot:

If the link is encoded with base64, you can just wrap the last line with “Base64.decode”.

Like what you read? Give Jaison Erick a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.