ilovecinema.pl File Reference

Go to the source code of this file.

Functions

use vars qw ($opt_h $opt_r $opt_d $opt_i $opt_v $opt_D $opt_M $opt_P)
 binmode (STDOUT,":utf8")
 if ($data=~/(\d+)/)
 if ($plot_data!~/.+no_descr/)
 if (defined $opt_d)
 if ($poster_data=~s/< a href=\"http:\/\/.{0,3}imdb.com\/title\/tt(\d+)\///){ if (defined $opt_d) { print "Found IMDB number:".$1; } getIMDBMoviePoster($1); } } sub getIMDBMoviePoster { my ($movieid)=@_; # grab movieid parameter if (defined $opt_d) { printf("#looking for movie id: '%s'\n", $movieid);} # get the search results page my $request = "http:if(defined $opt_d){printf("# request: '%s'\n", $request);}my $response=get $request;if(defined $opt_r){printf("%s", $response);}if(!defined $response){return;}my $uri="";#look for references to impawards.com posters-they are high quality my $site="http://www.impawards.com";my $impsite=parseBetween($response,"<a href=\"".$site,"\">".$site);#jersey girl fix $impsite=parseBetween($response,"<a href=\"http://impawards.com","\">http://impawards.com") if($impsite eq"");if($impsite){$impsite=$site.$impsite;if(defined $opt_d){print"# Searching for poster at: ".$impsite."\n";}my $impres=get $impsite;if(defined $opt_d){printf("# got %i bytes\n", length($impres));}if(defined $opt_r){printf("%s", $impres);}#making sure it isnt redirect $uri=parseBetween($impres,"0;URL=..","\">");if($uri ne""){if(defined $opt_d){printf("# processing redirect to %s\n", $uri);}#this was redirect $impsite=$site.$uri;$impres=get $impsite;}#do stuff normally $uri=parseBetween($impres,"<img SRC=\"posters/","\" ALT");#uri here is relative...patch it up to make a valid uri if(!($uri=~/http:(.*)/)){my $path=substr($impsite, 0, rindex($impsite, '/')+1);$uri=$path."posters/".$uri;}if(defined $opt_d){print"# found ipmawards poster: $uri\n";}}#try looking on nexbase if($uri eq""&&$response=~m/< a href="([^"]*)">([^"]*?) nexbase/i)
 if ($uri eq"")
 elsif (defined $opt_P)

Variables

 $title = "ilovecinema query"
 $version = "v1.0"
 $author = "Oleksiy Kokachev"
my countries = qw(Russia)
my $plot_data = parseBetween($response,"<div class=\"film_descr\">","</div>")
my $cast_data = parseBetween($response,"<table class=\"film_persons\">","</table>")
 $poster_data = parseBetween($response,"<div class=\"details_links\">","</div>")
my movie_titles
my $found_low_res = 0
my $k = 0
print $uri n


Function Documentation

use vars qw ( $opt_h $opt_r $opt_d $opt_i $opt_v $opt_D $opt_M $  opt_P  ) 

binmode ( STDOUT  ,
":utf8"   
)

if ( data = ~ /(\d+)/  ) 

Definition at line 121 of file ilovecinema.pl.

if ( $plot_data!~/.+no_descr/   ) 

Definition at line 127 of file ilovecinema.pl.

if ( defined $  opt_d  ) 

Definition at line 133 of file ilovecinema.pl.

if (  ) 

Definition at line 198 of file ilovecinema.pl.

if ( $uri eq""   ) 

Definition at line 287 of file ilovecinema.pl.

elsif ( defined $  opt_P  ) 

Definition at line 472 of file ilovecinema.pl.


Variable Documentation

$title = "ilovecinema query"

Definition at line 23 of file ilovecinema.pl.

$version = "v1.0"

Definition at line 24 of file ilovecinema.pl.

$author = "Oleksiy Kokachev"

Definition at line 25 of file ilovecinema.pl.

my countries = qw(Russia)

my $plot_data = parseBetween($response,"<div class=\"film_descr\">","</div>")

Definition at line 126 of file ilovecinema.pl.

my $cast_data = parseBetween($response,"<table class=\"film_persons\">","</table>")

Definition at line 139 of file ilovecinema.pl.

$poster_data = parseBetween($response,"<div class=\"details_links\">","</div>")

Definition at line 197 of file ilovecinema.pl.

Definition at line 301 of file ilovecinema.pl.

my $found_low_res = 0

Definition at line 302 of file ilovecinema.pl.

my $k = 0

Definition at line 303 of file ilovecinema.pl.

Referenced by sajax_get_js_repr().

print $uri n

Definition at line 337 of file ilovecinema.pl.


Generated on Sat Dec 18 05:15:53 2010 for MythTV by  doxygen 1.5.5