Skip to content

Instantly share code, notes, and snippets.

@andrewalker
Created June 14, 2012 19:12
Show Gist options
  • Save andrewalker/2932293 to your computer and use it in GitHub Desktop.
Save andrewalker/2932293 to your computer and use it in GitHub Desktop.
Watch YAPC::NA on player of choice
#!/usr/bin/env perl
use warnings;
use strict;
# usage:
# mplayer $(perl watch.pl http://ics.webcast.uwex.edu/mediasite/Viewer/?peid=ceecb7a37e3f4dbbb13e7f5cc9f513291d)
my $url = shift;
$url =~ /\?peid=(.*)$/;
my $peid = substr($1, 0, -2);
my @parts = (
substr($peid, 0, 8),
substr($peid, 8, 4),
substr($peid, 12, 4),
substr($peid, 16, 4),
substr($peid, 20)
);
local $" = '-';
print "http://video.ics.uwex.edu/@parts";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment