Skip to content

Instantly share code, notes, and snippets.

@kidpixo
Last active April 5, 2016 09:13
Show Gist options
  • Save kidpixo/3d83186aa414600f70970451d0adf537 to your computer and use it in GitHub Desktop.
Save kidpixo/3d83186aa414600f70970451d0adf537 to your computer and use it in GitHub Desktop.
Ddownload the lpsc2016 livestream videos, because youtube-dl has some bug with livestream.com. It extract each video url and name and saves it.
#1.1 this implies you have curl, sed , grep and jq on your system, if not skip to section #2.1
curl http://livestream.com/viewnow/LPSC2016 | grep ".smil" | sed -e 's#<script type="text/javascript">window.config =##' -e 's#;</script>##' | jq -M . > view-source_livestream.com_viewnow_LPSC2016.json
#1.2 this filter the json data embedded in the html page
jq ".event.feed.data[] | { caption : .data.caption , progressive_url_hd : .data.progressive_url_hd}" view-source_livestream.com_viewnow_LPSC2016.json
#2.1 A wise use of vim & regex produces >
curl -o "Press Briefing: Tales of a Tilting Moon Hidden in Lunar Ice.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/2aaed534-8d90-41b0-94e9-6a898d710a8a_2000.mp4?__gda__=1459861194_7b3cae019a2f51c7abc70ddeded804ba"
curl -o "The Exploration of Pluto.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/15d4b2b5-c873-4f8f-baf0-bf442c450b19_2320.mp4?start=75&end=5078&__gda__=1459861194_eab4c7c7f9ffb86b211c9d7483539194"
curl -o "Press Briefing: Ceres: Dispatches from a Dwarf Planet.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/3d25c4a1-96e5-495b-ac58-c5e86f91217e_2000.mp4?__gda__=1459861194_9c74e4000f529649f227cdb30a3a39c2"
curl -o "NASA Headquarters Briefing.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/5283acf9-00ae-4071-ae07-43b492836dea_2320.mp4?start=384&end=5312&__gda__=1459861194_204efd90f5a5b246fd25ea9ff141379d"
curl -o "SPECIAL SESSION:  New Horizons at Pluto! First Year of Mapping.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/f3fd5a26-c7eb-4d41-98c7-f1b2b78d84e0_1756.mp4?start=120&end=9402&__gda__=1459861194_58e2dbd3c5f38e3940b4513626c6a7b6"
curl -o "Plenary Session Featuring the Masursky Lecture.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/d4518d23-7171-490c-93c5-379d4bc90add_2320.mp4?start=45&end=3308&__gda__=1459861194_240aabbaa1c1580a0edad1c56b1d9c0e"
curl -o "Press Briefing - New Horizons: Peering into Pluto’s Past.mp4" "http://pdvod.new.livestream.com/events/00000000004c5105/956fc462-9897-4198-a85d-38481481d41c_2320.mp4?start=75&end=3065&__gda__=1459861194_52327ddd3621f122da23acce5f9232fc"
#2.2 save the curl block in a file and run
bash curlfile
#2.3 it will download all the HD stream in the current directory
#2.4 have fun and share some love with me :-D https://twitter.com/@kidpixo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment