Showing posts with label chrome. Show all posts
Showing posts with label chrome. Show all posts

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

How to download videos with Google Chrome


When I moved to Chrome I tried to find equivalents to all the extensions I was using in Firefox, including video downloading managers, so I first had to switch to the 4.x Beta as the 3.x version didn't support extensions yet. But at that time there were no downloading extensions at all, as Google didn't yet release the APIs for that, so what I did was switching to FF (and waiting an eternity for it to start) whenever I wanted to download a video. Until one happy day, in Chrome I played a video I had already played some days ago, it instantly loaded! Which reminded me of the browser cache, I went searching for Chrome's cache folder, and there I found all the played videos !


Conclusion: To "download" your videos you just have to play them and you'll find them in the cache folder !

You will find a lot of files there with unrecognizable names and without extensions, so to spot your videos you can sort by size or by date, it'll be easier in Linux as it doesn't need extensions to display file thumbnail previews.

Chrome's cache folder in Linux :
/home/your_user_name/.cache/google-chrome/Cache

Chrome's cache folder in Windows XP :
C:\Documents and Settings\your_user_name\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache

Chrome's cache folder in Windows Vista :
C:\Users\your_user_name\AppData\Local\Google\Chrome\User Data\Default\Cache

Chrome's cache folder in Windows 7 :
C:\Users\your_user_name\AppData\Local\Google\Chrome\User Data\Default\Cache


If going through all the files in that folder is frustrating, you can always use the extension Click&Clean that has a feature to play and save the videos present in your cache.