diff options
author | Seungwon Jeong <seungwon0@gmail.com> | 2012-07-04 00:01:26 +0900 |
---|---|---|
committer | Seungwon Jeong <seungwon0@gmail.com> | 2012-07-04 00:01:26 +0900 |
commit | d1d8cd35a24b74a011c1ca2cc5f95340554ea874 (patch) | |
tree | 1b88256bb4ca4a116c62d8ffa7db6f4bb22b9a8a | |
parent | baf03e18c256540d2a3869272c3cf9ec83c66ba4 (diff) | |
download | get-flash-videos-d1d8cd35a24b74a011c1ca2cc5f95340554ea874.tar.gz |
[Daum] Get video type
-rw-r--r-- | lib/FlashVideo/Site/Daum.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/FlashVideo/Site/Daum.pm b/lib/FlashVideo/Site/Daum.pm index 2846ebc..f0ef185 100644 --- a/lib/FlashVideo/Site/Daum.pm +++ b/lib/FlashVideo/Site/Daum.pm @@ -20,7 +20,10 @@ sub find_video { my $video_url = get_video_url($browser, $video_id); debug "Video URL: ${video_url}"; - return $video_url, title_to_filename($video_title); + # Step 4: Get video type + my $video_type = ( $video_url =~ /[.]mp4/xms ) ? 'mp4' : 'flv'; + + return $video_url, title_to_filename($video_title, $video_type); } # Internal subroutines |