Index: /lang/perl/WWW-YourFileHost/trunk/t/00.load.t
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/t/00.load.t (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/t/00.load.t (revision 3614)
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'WWW::YourFileHost' );
+}
+
+diag( "Testing WWW::YourFileHost $WWW::YourFileHost::VERSION" );
Index: /lang/perl/WWW-YourFileHost/trunk/t/01.t
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/t/01.t (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/t/01.t (revision 3614)
@@ -0,0 +1,17 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use WWW::YourFileHost;
+use Test::More tests => 4;
+
+my $url = "http://www.yourfilehost.com/media.php?cat=video&file=guns_dont_kill_people.flv";
+
+my $res = WWW::YourFileHost->new( url => $url );
+isa_ok $res, 'WWW::YourFileHost';
+
+my $checksum = 'a5f6dd20981c6b3a69e949b289613b07';
+like $res->photo,    qr/$checksum\.jpg$/, 'photo';
+like $res->video_id, qr/$checksum\.flv/, 'video_id';
+is $res->embed,      $url;
+
Index: /lang/perl/WWW-YourFileHost/trunk/t/perlcritic.t
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/t/perlcritic.t (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/t/perlcritic.t (revision 3614)
@@ -0,0 +1,9 @@
+#!perl
+
+if (!require Test::Perl::Critic) {
+    Test::More::plan(
+        skip_all => "Test::Perl::Critic required for testing PBP compliance"
+    );
+}
+
+Test::Perl::Critic::all_critic_ok();
Index: /lang/perl/WWW-YourFileHost/trunk/t/pod.t
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/t/pod.t (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/t/pod.t (revision 3614)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
Index: /lang/perl/WWW-YourFileHost/trunk/t/pod-coverage.t
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/t/pod-coverage.t (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/t/pod-coverage.t (revision 3614)
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
Index: /lang/perl/WWW-YourFileHost/trunk/MANIFEST
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/MANIFEST (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/MANIFEST (revision 3614)
@@ -0,0 +1,10 @@
+Build.PL
+Changes
+MANIFEST
+Makefile.PL
+README
+lib/WWW/YourFileHost.pm
+t/00.load.t
+t/perlcritic.t
+t/pod-coverage.t
+t/pod.t
Index: /lang/perl/WWW-YourFileHost/trunk/lib/WWW/YourFileHost.pm
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/lib/WWW/YourFileHost.pm (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/lib/WWW/YourFileHost.pm (revision 3614)
@@ -0,0 +1,93 @@
+package WWW::YourFileHost;
+
+use warnings;
+use strict;
+use Carp;
+use URI;
+use Web::Scraper;
+use URI::Escape;
+use LWP::UserAgent;
+use CGI;
+
+our $VERSION = '0.01';
+
+sub new {
+    my ( $class, %opt ) = @_;
+    my $self = bless { %opt }, $class;
+    $self->_scrape;
+    $self;
+}
+
+sub _scrape {
+    my $self = shift;
+    my $url = $self->{url} || croak "url param is requred";
+    croak "url is not yourfilehost link"
+	unless $url =~ m!yourfilehost.com/media.php\?!;
+
+    my $s = scraper {
+	process '//object[@id="objectPlayer"]' =>
+	    process '//param[@name="movie"]', 'value' => '@value';
+    };
+
+    my $res = $s->scrape( URI->new($url) );
+    croak "video information is not found" unless $res->{value};
+    $res->{value} =~ m/&video=(.*?)&/;
+    my $api_url = uri_unescape($1);
+    
+    my $ua = LWP::UserAgent->new();
+    $res = $ua->get($api_url);
+    croak "" unless $res->is_success;
+    my $query = CGI->new($res->content);
+    $self->{query} = $query;
+}
+
+sub photo {
+    my $self = shift;
+    return $self->{query}->param("photo");
+}
+
+sub video_id {
+    my $self = shift;
+    return $self->{query}->param("video_id");
+}
+
+sub embed {
+    my $self = shift;
+    return $self->{query}->param("embed");
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+WWW::YourFileHost - Get video informations from YourFileHost
+
+=head1 VERSION
+
+This document describes WWW::YourFileHost version 0.0.1
+
+=head1 SYNOPSIS
+
+    use WWW::YourFileHost;
+
+    my $url = 
+    "http://www.yourfilehost.com/media.php?cat=video&file=hoge.wmv";
+    my $yourfilehost = WWW::YourFileHost->new( url => $url );
+    print $yourfilehost->photo . "\n";
+    print $yourfilehost->video_id . "\n";
+    print $yourfilehost->embed . "\n";
+
+=head1 AUTHOR
+
+Yusuke Wada  C<< <yusuke@kamawada.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Yusuke Wada C<< <yusuke@kamawada.com> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
Index: /lang/perl/WWW-YourFileHost/trunk/Makefile.PL
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/Makefile.PL (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/Makefile.PL (revision 3614)
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+    NAME                => 'WWW::YourFileHost',
+    AUTHOR              => 'Yusuke Wada <yusuke@kamawada.com>',
+    VERSION_FROM        => 'lib/WWW/YourFileHost.pm',
+    ABSTRACT_FROM       => 'lib/WWW/YourFileHost.pm',
+    PL_FILES            => {},
+    PREREQ_PM => {
+        'Test::More' => 0,
+        'version'    => 0,
+    },
+    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+    clean               => { FILES => 'WWW-YourFileHost-*' },
+);
Index: /lang/perl/WWW-YourFileHost/trunk/Changes
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/Changes (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/Changes (revision 3614)
@@ -0,0 +1,5 @@
+Revision history for WWW-YourFileHost
+
+0.0.1  Wed Dec 12 22:33:21 2007
+       Initial release.
+
Index: /lang/perl/WWW-YourFileHost/trunk/Build.PL
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/Build.PL (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/Build.PL (revision 3614)
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+    module_name         => 'WWW::YourFileHost',
+    license             => 'perl',
+    dist_author         => 'Yusuke Wada <yusuke@kamawada.com>',
+    dist_version_from   => 'lib/WWW/YourFileHost.pm',
+    requires => {
+        'Test::More' => 0,
+        'version'    => 0,
+    },
+    add_to_cleanup      => [ 'WWW-YourFileHost-*' ],
+);
+
+$builder->create_build_script();
Index: /lang/perl/WWW-YourFileHost/trunk/README
===================================================================
--- /lang/perl/WWW-YourFileHost/trunk/README (revision 3614)
+++ /lang/perl/WWW-YourFileHost/trunk/README (revision 3614)
@@ -0,0 +1,45 @@
+WWW-YourFileHost version 0.0.1
+
+[ REPLACE THIS...
+
+  The README is used to introduce the module and provide instructions on
+  how to install the module, any machine dependencies it may have (for
+  example C compilers and installed libraries) and any other information
+  that should be understood before the module is installed.
+
+  A README file is required for CPAN modules since CPAN extracts the
+  README file from a module distribution so that people browsing the
+  archive can use it get an idea of the modules uses. It is usually a
+  good idea to provide version information here so that people can
+  decide whether fixes for the module are worth downloading.
+]
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+	perl Makefile.PL
+	make
+	make test
+	make install
+
+Alternatively, to install with Module::Build, you can use the following commands:
+
+	perl Build.PL
+	./Build
+	./Build test
+	./Build install
+
+
+DEPENDENCIES
+
+None.
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2007, Yusuke Wada
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
Index: /lang/perl/WWW-YourFileHost/.cvsignore
===================================================================
--- /lang/perl/WWW-YourFileHost/.cvsignore (revision 3614)
+++ /lang/perl/WWW-YourFileHost/.cvsignore (revision 3614)
@@ -0,0 +1,10 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+WWW-YourFileHost-*
+cover_db
