Tag Archives: norwegian-apis

I made an nrk thing

Have you ever wanted to leisurely browse the subtitles for your favorite TV show? Does that specific show currently exist in the web player for the Norwegian Broadcasting Company? Boy do I have news for you!

It was made as a language learning aid, and it started as a very simple scraping app. The problem with that approach was that NRK kept changing their website so my app kept breaking. Recently I found out that they actually have an API for most of the stuff I needed, and now the app is stable enough to publish! I still have to scrape the website to figure out what shows are available, but after that we’re pretty stable.

I’m not a designer. Actually, I don’t have a single designer bone in my body, but I still did my best. The react app has drop shadows, and it’s somewhat responsive. All of which goes away when you want to print something. What more could you want?

If anyone wants to help me pick better colors, feel free to make a pull request to the repo! If you’re wondering how it looks on desktop, just run the docker container and find out! It’s all there in the readme.

Let’s do a song of the blog, it’s been a while.


I’m a wizard

So you’re looking to move in Norway

Hey, long time no blag.

My other half and I are looking to relocate, which means spending lots of time on FINN.no trying to find the perfect house. One of our main criteria is travel distance to work, as I imagine is the case for most people. Lucky for us, we both work in the same area, which makes figuring that part out quite easy. Now, FINN has some nifty features that can help with this, but all of them will move you away from the page you’re browsing, or open in a new tab, or take you to google maps or something. Super useful if you’re only looking at one property, but that is most decidedly not how we do things around here.

Just a few tabs

Can’t go opening another tab for each of those tabs to see which is closer to work, cant follow links and get lost and possibly lose the best one out there. So what’s a poor web developer to do?

Dark Mode
It’s a chrome extension

I made a chrome extension. It’s not in the “app store”, you’ll have to go to chrome://extensions and turn on developer mode so you can load the unpacked extension yourself. Once you have it installed it’s pretty self explanatory, set your work address, then start finding trips to work by searching in the From address field.

But that’s not all! This extension was made for FINN.no. So if you’re viewing an ad for a house/appartment/box on FINN, the extension will automatically use the metadata on the page to grab the coordinates of your dream home, and look up the trip right away, no interaction required!

That’s it for me for now. I got to play with two Norwegian public APIs to make this, one to look up addresses and turn them into GPS coordinates, which was just plain old REST from https://geonorge.no. Cool stuff, but hardly revolutionary. The second one was from https://en-tur.no, which really surprised me. They have a fully fleshed out graphql API! Documentation was a bit sparse, but with your standard igraphql browser “IDE”, we got there.

I’ve started to take note of the different Norwegian services that expose public APIs, and I’m definitely pleasantly surprised by what’s out there. Just look around and ye shalt finde coole shit.

Bye

PS: I’ve been postponing blogging because I’ve been working on replacing WordPress with some homebrew solution. It’s getting there, but I have a job and a house hunt to deal with, so don’t hold your breath.