How to download a CBC radio show episode no longer available as a podcast

Sadly, CBC (Canadian Broadcasting Corporation) has a policy to keep podcasts available for download only 3 months for daily shows and 6 months for weekly shows with some of them being available for an even shorter time. Luckily, most shows can still be streamed from the CBC radio website using a flash/web player but are still no longer available for direct download. That’s convenient if you’re in front of your computer (which is seldom the case when listening to radio), but not that practical if you want to take an old favorite on a run.

Most of what we do on our computers is just data copying and playback, always in that order. So if it’s playing in your computer speakers, its coming from a stream, and if it’s coming from a stream, it can be copied as file. There are tons of software and websites that will let you do just that, but most of them are geared towards more popular streaming sites of the likes of YouTube and such so I had to resort to another technique for the CBC’s website. The non-trivial part here is to find the URL from which the data is coming from but modern web browsers and their built-in debugging facility have made this an easy task. Once you have the URL, you’re free to download the wanted file at will. This process assumes you’re using Chrome, but it works just as well with Firefox.

So let’s say I want to download this past episode of the show Ideas. There is a player on the page, but no download link.

  1. Bring up the page in Chrome but don’t start streaming yet.
  2. Left-click anywhere on the page and click on “Inspect element“, this will bring up the Chrome debugger.
  3. Within the debugger, switch over to the “Network” tab.
  4. On the episode’s page, start steaming the episode by clicking the play button, you’ll see a bunch of things happening in the debugger window.
  5. Click on the “type” column to sort the data elements by type and find the audio/mpeg (or media) one, that’s the file you’re streaming (see screenshot below). Mine’s name is ideas_20130307_53465_uploaded.mp3.
  6. Left-click on the name and select “Copy link address” or “Open in new tab” and that’s it, from there you can download the episode as a file. The link for my episode is http://thumbnails.cbc.ca/maven_legacy/thumbnails/14/881/ideas_20130307_53465_uploaded.mp3. When opening up the link in your browser, it might bring up its own player but if you click around, you’ll find an option to download the file instead of playing it.
Chrome debugger view with the stream data row highlighted. Left-clicking on the row will bring up a link to the stream itself and allow its downloading.

Chrome debugger view with the stream data row highlighted. Left-clicking on the row will bring up a link to the stream itself and allow its downloading.

Nuts for coconuts, the amazing ways of consuming this exotic fruit

The coconut at the stage we are most familiar with

We know coconuts as the principal ingredient of a piña colada, we know coconuts as the tasty filling of a bounty chocolate bar, we know coconuts as the crucial part of a good curry, we know coconuts for their awesome taste but otherwise, we remain pretty ignorant about its many uses and life cycle.

Allow me to enlighten you with my recent experience with this incredible fruit and the knowledge I gathered from the locals in the Carribean. While not scientifical, I sincerely hope you will remember this little piece should you ever become stranded on a lonely tropical island. Otherwise, just take it as a little how-to guide for the next time you find yourself around a lot of coconuts.

An opened coconut

Coconuts as their name implies, are the nuts (or fruit (technically a drupe)) of the coconut palm tree. They grow everywhere around the carribean coast of Costa Rica and as far as I know, their extend is very large and in some cases, their productivity can turn them into a nuisance. There is no season for these trees, they just constantly produce all throughout the year, with every batch taking a couple months to mature. Coconuts are large fruits and do not biodegrade very easily. So much so that locals have to get rid of them (and their leaves) using bonfires.

A yellow coconut palm

Coco palms come into a few varieties which are mainly differentiated by the colours of their nuts: yellow, green, or something in between. If you are after pipa, you will prefer the green variety for its sweetness but when they age, the differences in flavor dissapear and the nuts all turn the same brown.

The pipa

A green coconut palm, preferred for pipa

There is a couple of vendors yelling “pipa fria” around you but cannot quite figure out what they are selling? Its coconut water, or “pipa”. A young coconut before it becomes ripe has a lot of water in it, easily 150 ml I would say. This water is sweet, very rich in minerals and feels very healthy to drink, if you can get past the weird taste (it’s somewhat of an acquired thing). Mike, another volunteer at the association has aptly called pipa “the gatorade of the jungle”: some local guides will not bring any water bottles on patrols, they will just reach up for a pipa or two.

A yellow “coco tierno” alongside a green pipa

The pipa is probably the stage of the coconut that is easiest to consume. Vendors in the street will slice the top off, put in a straw an refrigerate pipas but in nature, you just grab, smash and drink. Grab a pipa from the palm, smash it one or two times against the trunk until the nut cracks and drink the dripping water. It’s a bit messy but even though it is sweet, pipa will not get your hands all sticky.

The older pipa (or half-coconut)

Size comparison of a more mature coconut to a young pipa (which I am holding)

As they age and ripe, pipas grow bigger, thicker, and get harder to crack open. Should you succeed tough, you get rewarded with sweeter coconut water and a gelatinous substance called “coco tierno” (tender coco) that covers the inside surface. Coco water serves as a suspension for the endosperm of the nut and as it matures, will form this deposit. This substance is what is later going to become the white hard flesh of a ripe coconut and while the taste is somewhat different, it definitely hints towards that flavor.

The white gelatinous flesh can be scooped using a slice from the skin, notice the presence of shell

This tasty flesh can be scooped using a broken piece from the shell or a slice from the skin of the husk but in order to access it the nut has to be split in half. Without the proper tools (a machete), this is quite a challenge and requires a lot of smashing around and prying. At this stage, the very hard shell which we are used to crack with a hammer has started forming.

The nut (as we know it)

The tool of choice when working with coconuts: the machete

Now we come back into known territory, the ripe and mature nut is what we are used to finding in northern hemisphere supermarkets. What we are not familiar with however is how incredibly hard it is to get to the nut itself. Covered by a dry husk made of a thick skin and very fibrous material, this one it truly a “tough nut to crack”. Once open, little coconut water remains, most of it has coalesced into the very flavorful flesh we are all so fond of.

A ripe coconut with the husk removed

When on the ground and in the presence of humidity, the nut will obviously start to germinate. From one end of the nut, leaves will burgeon and from that same end a root system will emerge, all feeding on what is inside the nut and turning the flesh and water into a coconut sponge. Very rich, this sponge when be pressed will ooze oil (good for cooking) or can simply be eaten. Be careful, common wisdom has that eating too much of this will give you diarrhea.

A germinating coconut

These nuts are nature’s own small ships, known to have traveled by sea for thousand kilometers to land on a small remote island and populate it with this awesome tree. I did not get into the great many uses of the husk (textile), shell (jewelry, combustible) and the tree (lumber) itself, I did not cover the great many culinary, medicinal and industrial applications of this plant as well. I admit to be

Coconut sponge

wholly ignorant in this matter: the list of use cases for the coconut palm and its fruits seems virtually endless, I just know how to eat them raw.

Now we need to figure out how to grow these in Canada.

Partitioning an Ipod to FAT32 and ext3

I recently inherited my sister’s “defective” (but fixed for 5$) 120GB Classic Ipod and managed to partition it the way I wanted. It was not a trivial process so I tought I’d share my experience with the web so others can benefit from it.

My music library is far from being 120GB so even if I feed the Ipod all my tunes, I’d still have a lot of free space on it. Granted, you can mount the Ipod as a mass storage device and stuff the rest with anything, but here’s the catch: Ipods will only format to FAT32 or HFS+ file systems if you use iTunes. As a consequence, if you pick HFS+, you will not be able to use them on windows and some *nix (if they lack the HFS+ support module) and if you choose FAT32, backup solutions such as backtintime will not work (they need a journaling file system).

So I took to partitioning my Ipod with two different partition using a different file system for each, FAT32 and EXT3. I tough it would be a simple task, but turns out that it wasn’t. Just formatting the Ipod and letting gtkpod rebuild it did not cut it; the device would stutter, only play the first few seconds of each track and give off artifacts while displaying the CD covers. And when plugged in iTunes, the software would report the device as corrupted and offer me to reset it. I thought that gtkpod must be missing on something so I should use iTunes instead yo rebuild it, but iTunes would still ask me to reset my iPod. Here is what worked after a fair amount of tinkering:

  1. Reset the iPod with iTunes (on a different computer since this tutorial assumes you are using a *nix).
  2. Plug it on Linux and run the following command on the user partition. My Ipod is a 6th generation classic, there is no partition for the firmware, it sits somewhere on the MCU flash, but it appears that older Ipod use a firmware partition so leave it alone. Paying attention to that particularity, here is the commands you need to run:
    1. Unmount the plugged int Ipod with umount  /dev/sdXY Where X is the device letter of your Ipod and Y is the partition number.
    2. dd if=/dev/sdXY of=ipod.bk bs=512M Where X is the user partition of you Ipod and Y is the partition number. This will effectively copy 512MB of raw bytes from you Ipod partition and save it to the ipod.bk file.
  3. Next, take your Ipod and format it the way you want using fdisk. If you have a firmware partition, do not destroy it! Keep the following points in mind:
    1. Use a Master Boot Record (MBR)
    2. All partitions should be primary
  4. Finally: dd of=/dev/sdXY if=ipod.bk bs=512M Where X is the user partition of you Ipod and Y is the partition number. This is going to copy back that 512MB file we extracted earlier from the Ipod, setting that partition the way it was before the repartitioning.

Voilà! Plug your Ipod in, upload music with you favorite app and do backups with your file system of choice. Mine is happily working with that setup: Ipod stuff on FAT32 and backintime on EXT3.

The quirk I got with this technique was that both iTunes and the Ipod report the full size of the internal hard drive as being available for music while in reality its not; it looks like the firmware keeps a record of the empty space withing the files of the user partition (why it is not computing it is anyone’s guess). You should probably be careful not to fill it up to a point where the two partitions would overlap (although that should not happen if the firmware is paying attention but then again, not tested).

Enjoy!