xmltv/grab/uk_tvguide tv_grab_uk_tvguide,1.16,1.17
Geoff <[email protected]> Thu, 30 Jun 2016 19:47:00 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/uk_tvguide
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4035
Modified Files:
tv_grab_uk_tvguide
Log Message:
Unbreak after site changes - actor names + roles
Index: tv_grab_uk_tvguide
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_tvguide/tv_grab_uk_tvguide,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tv_grab_uk_tvguide 29 Jun 2015 16:38:09 -0000 1.16
--- tv_grab_uk_tvguide 30 Jun 2016 19:46:57 -0000 1.17
***************
*** 266,290 ****
my $treedetail = XMLTV::Get_nice::get_nice_tree($url);
! my $showdetail = $treedetail->look_down('_tag' => 'div', 'id' => 'content-engage');
# $showdetail->dump;
if ($showdetail) {
# Details page contains Director names and a better list of Actors
!
! if ( my ($cast) = $showdetail->look_down('_tag' => 'div', 'class' => qr/castoverlay/) ) {
!
# Get the cast and extract them into a new tree
! my @lis = $cast->look_down('_tag' => 'li');
!
LOOP:
foreach my $person (@lis) {
- # <div>Don Sharp </div><div class="partname">Director</div>
- # <div>Antonio Banderas</div> <div class='partname' >Ahmed Ibn Fahdlan</div>
#
my ($name, $role);
! if ( my ($_name) = $person->look_down('_tag' => 'div') ) {
$name = $_name->as_text;
}
! if ( my ($_role) = $person->look_down('_tag' => 'div', 'class' => 'partname') ) {
$role = $_role->as_text;
}
--- 266,298 ----
my $treedetail = XMLTV::Get_nice::get_nice_tree($url);
! my $showdetail = $treedetail;
# $showdetail->dump;
if ($showdetail) {
# Details page contains Director names and a better list of Actors
!
# Get the cast and extract them into a new tree
! my @lis = $showdetail->look_down('_tag' => 'div', 'class' => 'cast-entry');
!
LOOP:
foreach my $person (@lis) {
#
+ # 30/6/16
+ # <div class="cast-entry">
+ # <span class="role">Margaret Sellinger</span>
+ # <a href="http://www.tvguide.co.uk/actor.asp?actor=Lesley-Anne Down" target="_blank">
+ # <span itemprop="actor" itemscope itemtype="http://schema.org/Person">
+ # <span class="actor" itemprop="name">Lesley-Anne Down</span>
+ # </span>
+ # </a>
+ # <a target="_blank" href="http://uk.imdb.com/find?s=nm&q=Lesley-Anne+Down"><span class="actor">(IMDB)</span></a>
+ # </span>
+ # </div>
+
my ($name, $role);
! if ( my ($_name) = $person->look_down('_tag' => 'span', 'itemprop' => 'name') ) {
$name = $_name->as_text;
}
! if ( my ($_role) = $person->look_down('_tag' => 'span', 'class' => 'role') ) {
$role = $_role->as_text;
}
***************
*** 389,393 ****
undef @lis;
- }
} # end showdetail
}
--- 397,400 ----
***************
*** 966,970 ****
1. Improve the progress bar update frequency
! 2. Add actor 'character' attribute
3. Currently only does Actor, Director, Producer, Writer - does anyone actually use any of the others present in the DTD?
--- 973,977 ----
1. Improve the progress bar update frequency
! 2. Add actor 'character' attribute DONE 30/6/16
3. Currently only does Actor, Director, Producer, Writer - does anyone actually use any of the others present in the DTD?
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape