How to watch Norwegian video news in your own mplayer

Some time ago, I started writing NRK Scraper, a small tool that takes apart the Norwegian national broadcaster’s website and gives you back pure, nice video streams. NRK’s site can’t do that: It’s full of crazy Flash applets and advertisements that make my browser explode. Here’s a screenshot of clean NRK video instead:


However, NRK Scraper is very young. The core functions are there, but the tools for them aren’t very nice yet. So here’s how to use NRK Scraper on an Ubuntu 8.04 box, but it works on any OS that can run Ruby:

  1. Grab the latest NRK Scraper release from the file releases page at Rubyforge.
  2. Save it somewhere useful, let’s say /home/yourname/nrkscraper-x.x.x.tar.gz (the x.x.x of course represents the current version of NRK Scraper, 0.0.3 at the moment)
  3. Open a terminal and change to your home directory by typing cd.
  4. Type tar xvfz nrkscraper-x.x.x.tar.gz (of course replacing x.x.x with the actual version number)
  5. Type cd nrkscraper-x.x.x (again replacing x.x.x with the actual version number)
  6. Now install Ruby and the libraries that NRK Scraper needs: sudo apt-get install ruby libwww-mechanize-ruby libxml-ruby (You can of course use other packaging tools such as Synaptic to install these)
  7. Make sure mplayer is installed on your machine. If it isn’t, try apt-get install mplayer-nogui
  8. Type ./video_player.rb -u
  9. After a while of fetching pages and analyzing, mplayer should start playing the news in fullscreen! You can also launch video_player.rb at any other of NRK’s video-containing pages by giving that as an argument for the -u option. But video_player.rb is only a small example script! You can also download whole shows using the download_stream.rb script.

Now why am I telling you all this? I want you to help me improve NRK Scraper! If you know a little Ruby and would like to make NRK Scraper a better thing, please join the project. There’s a page at Rubyforge, and a bunch of very useful new features are already added as feature requests, such as the ability to recursively download all the episodes of a show that you’re interested in.

2 thoughts on “How to watch Norwegian video news in your own mplayer”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s