Advertisement
crabbypup

RSS feed reader with sample data

Nov 29th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.23 KB | None | 0 0
  1. #current syntax in use to grab media URL
  2. ----------------------------------------------------------------------------------
  3. url=`echo "$r" | grep -e "${parse}" | sed -e 's/ /\n/g' | grep -e "${tag}" | grep -e "${format}" | sed -e 's/.*http//' -e 's/'${format}'\$.*//' | sed -e 's/'${format}'.*//'`
  4. ----------------------------------------------------------------------------------
  5. data set 1
  6. r="<p>Download: <a href="http://blip.tv/file/get/Thisoldnerd-HomeTheaterComponentsTheEpicSetupThisOldNerdS02E10HD173.m4v">HD (m4v)</a> | <a href="http://blip.tv/file/get/Thisoldnerd-HomeTheaterComponentsTheSetupThisOldNerdS02E10HDMP4669.mp4">HD (mp4)</a> | <a href="http://blip.tv/file/get/Thisoldnerd-HomeTheaterComponentsTheSetupThisOldNerdS02E10130.mp4">SD (mp4)</a> | <a href="http://blip.tv/file/get/Thisoldnerd-HomeTheaterComponentsTheEpicSetupThisOldNerdS02E10Tin459.mp4">Tiny (mp4)</a></p>"
  7.  
  8. tag="href="
  9. parse="<p>Download:"
  10. format="m4v"
  11. ----------------------------------------------------------------------------------
  12. data set 2
  13. r="<enclosure url="http://www.podtrac.com/pts/redirect.mp4/podcast.g4tv.com/videoDB/061/619/video61619/as20121127_doctorwho_pod.mp4" length="36745756" type="video/mp4" />"
  14.  
  15. tag="url="
  16. parse="<enclosure"
  17. format="mp4"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement