xmltv/grab/huro tv_grab_huro.in,1.57,1.58
Geoff <[email protected]> Sat, 26 Mar 2016 14:37:24 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/huro
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5987/xmltv/grab/huro
Modified Files:
tv_grab_huro.in
Log Message:
Add film rating to output (support ticket #202)
Index: tv_grab_huro.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/huro/tv_grab_huro.in,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** tv_grab_huro.in 26 Mar 2016 14:33:19 -0000 1.57
--- tv_grab_huro.in 26 Mar 2016 14:37:22 -0000 1.58
***************
*** 554,557 ****
--- 554,570 ----
push @urls, $a->attr(q(href));
}
+
+ # support ticket #202
+ # get the rating if available
+ # <img alt="(15)" title="nevhodné do 15ti let" class="age_limit_icon" src="http://media.port-network.com/page_elements/15_age_mini_pix.png">
+ if (my $img = $span[0]->parent()->look_down('_tag' => 'img', 'class' => 'age_limit_icon')) {
+ t "age limit icon found";
+ my $rating = $img->attr('alt');
+ $rating =~ s/[\(\)]//g; # strip the brackets
+ my $rating_icon = $img->attr('src');
+ t "age rating = $rating";
+ $program{rating} = [[ $rating, '', [{'src' => $rating_icon }] ]];
+ }
+
}
} # foreach $col
***************
*** 627,630 ****
--- 640,645 ----
$prog->{length} = $program->{length}
if defined $program->{length};
+ $prog->{rating} = $program->{rating}
+ if defined $program->{rating}; # support #202
# Setting stop date for the previous programm
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
xmltv-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltv-commit