How to capture direct stream links from webradios



Why
  • To be able to play web radios with your favorite player.
  • To spare yourself the use of a browser (or the web radio's proprietary app). No more need to open the radio website and keep that tab open (with all its annoying ads).
  • To save your device resources: an NRJ radio tab and associated flash plugin will consume around 200MB of RAM.
  • To feel powerful.
Problem
  • Kind radios provide you with the direct link. Most radios are not kind.
    • When radios are not kind and you are sharp, you press Ctrl+U to view the page source code and search for the link yourself. But if radios are evil they will hide the link inside Flash code. You then need to download and decompile that source, which is tedious.
    • Here is an easy and straightforward way for all situations.
How
  • Open Chrome. Well, you're already in.
    • If you use IE, you shouldn't be reading this post in the first place.
    • If you use Firefox, follow the steps here for Chrome and try to find your way with the fox.
  • Open the web radio.
  • Press Ctrl+Shift+I (or go to the options menu > Tools > Developer tools)
  • Select the Network Tab.
    • This lists all the page's HTTP requests.
    • You may need to reload the page if the list is empty, This works in real time and needs to acquire the requests.
  • Make sure your stream is playing.
  • Locate the broadcast element.
    • It's most easily located by sorting the contents by size, the element with the biggest traffic (and increasing) will be our stream.
    • Click on its name. A pane of details will appear, go to the Headers tab.
    • The first line, Request URL, is our stream!
  • Now take your precious URL and open it with your favourite player, Winamp, VLC, etc.
    • You can strip the URL off its query string, i.e. what starts with the question mark:
      http://95.81.147.7/3804/nrj_3804.mp3?type=.flv&amsparams=playerid:WebPlayer+5.0;skey:1361349427