Permalink
Browse files

Support youtu.be URLs as well as youtube.com

  • Loading branch information...
1 parent 652f525 commit 08a54d3fe23ecfc0a3453eea0e182463ded86fa2 @avar committed Nov 30, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Avarpics/Log.pm
View
3 lib/Avarpics/Log.pm
@@ -168,7 +168,8 @@ sub data_for_day {
}
$seen{$uri} = 1;
- } elsif ($line =~ m#youtube\.com/watch\?v=(\w{11})(\S*)#) {
+ } elsif ($line =~ m#youtube\.com/watch\?v=(\w{11})(\S*)# or
+ $line =~ m#youtu\.be/(\w{11})(\S*)#) {
my $id = $1;
my $rest = $2;
my $uid = "$id/$rest";

0 comments on commit 08a54d3

Please sign in to comment.