Using Tech-Ed OData to download videos
I wanted to watch the Teched 2010 videos, but the problem I had was going to the site manually to download files for offline viewing. And I was also interested only in Dev sessions which were level 300 / 400. Thanks to OData for teched http://odata.msteched.com/sessions.svc/ ,I could write 3 statements in linqpad and had them all downloaded using wget
File.Delete(@"C:\temp\download.txt");
Sessions
.Where (s => (s.Level.StartsWith("400") || s.Level.StartsWith("300") ) && s.Code.StartsWith("DEV"))
.Take(10)
.ToList()
.Select (s => @"http://ecn.channel9.msdn.com/o9/te/NorthAmerica/2010/mp4/" + s.Code + ".mp4" )
.Run(s => File.AppendAllText(@"C:\temp\download.txt",s + Environment.NewLine));
Util.Cmd(@"wget.exe -b -i c:\Temp\download.txt",true);
Forgot to mention for the Run extension method is from Reactive Extensions
Am I missing an assembly I should add to LINQPad? Because I get an error on all of the StartsWith statements being invalid.
J Wynia
June 16, 2010 at 9:54 am
Sorry about that, It is was error in the code it should have been s.Level.StartsWith
I have fixed it now.
Naveen
June 16, 2010 at 11:25 am
What assembly is the Run method in? I can’t seem the execute the above.
Thanks!
// Dave
Dave
June 16, 2010 at 10:29 am
Thanks. Forgot to mention , Run is from Reactive Extensions. I have updated the post with the information.
Naveen
June 16, 2010 at 11:26 am
i installed the Reactive Extensions for .NET 4, and added a reference in LinqPad (via Query Options) to System.Reactive.
Am I missing something? It still can’t find the .Run method.
Thanks!!!
// Dave
Dave
June 16, 2010 at 6:41 pm
Actually I just got it.
This is my first introduction to the Reactive Extensions.
I was missing System.CoreEx and System.Interactive.
I’ll have to check this out later. Maybe there is a TechEd session on it.
Thanks again!
// Dave
Dave
June 16, 2010 at 6:43 pm
I converted your magic into a WCF Syndication service so I could subscribe to it with the Zune software.
http://davecorun.com/blog/2010/06/16/creating-a-teched-2010-wcf-syndication-feed/
Thanks for the quick start!
// Dave
Dave
June 16, 2010 at 8:10 pm
[...] http://naveensrinivasan.com/2010/06/15/using-tech-ed-odata-to-download-videos/ [...]
Creating a TechEd 2010 WCF Syndication Feed | Dave Corun's Blog
June 16, 2010 at 8:08 pm