xmltv/grab/uk_guardian tv_grab_uk_guardian, 1.9, 1.10
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/uk_guardian
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8086
Modified Files:
tv_grab_uk_guardian
Log Message:
(minor) fix an issue with character encodings
Index: tv_grab_uk_guardian
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_guardian/tv_grab_uk_guardian,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tv_grab_uk_guardian 21 Jan 2014 11:00:15 -0000 1.9
--- tv_grab_uk_guardian 23 Jan 2014 13:11:38 -0000 1.10
***************
*** 252,256 ****
# title
my $showtitle = $show->look_down('_tag' => 'span', 'class' => 'tvg_show_title');
! $prog{'title'} = [[ encode( 'utf-8', decode( 'windows-1255', $showtitle->as_text)), 'en']];
# start
--- 252,256 ----
# title
my $showtitle = $show->look_down('_tag' => 'span', 'class' => 'tvg_show_title');
! $prog{'title'} = [[ encode('utf-8', $showtitle->as_text), 'en' ]];
# start
***************
*** 269,273 ****
# category translation?
# if (defined(&map_category)) { $category = map_category($category); }
! push @showcategories, [ $category ];
}
$prog{'category'} = [ @showcategories ] if (scalar @showcategories > 0);
--- 269,273 ----
# category translation?
# if (defined(&map_category)) { $category = map_category($category); }
! push @showcategories, [ encode('utf-8', $category) ];
}
$prog{'category'} = [ @showcategories ] if (scalar @showcategories > 0);
***************
*** 280,284 ****
$_showdesc .= '.' if ( (length $_showdesc) && (substr $_showdesc,-1,1 ne '.') ); # addend a fullstop
if (length $_showdesc) {
! $prog{'desc'} = [[ encode( 'utf-8', decode( 'windows-1255', $_showdesc)), 'en' ]];
}
}
--- 280,284 ----
$_showdesc .= '.' if ( (length $_showdesc) && (substr $_showdesc,-1,1 ne '.') ); # addend a fullstop
if (length $_showdesc) {
! $prog{'desc'} = [[ encode('UTF-8', $_showdesc), 'en' ]];
}
}
***************
*** 318,322 ****
#debug "--$showepnum-- ".$showepisode->as_text;
! if ($showep) { $prog{'sub-title'} = [[ encode( 'utf-8', decode( 'windows-1255', $showep)), 'en']]; }
}
--- 318,322 ----
#debug "--$showepnum-- ".$showepisode->as_text;
! if ($showep) { $prog{'sub-title'} = [[ encode('utf-8', $showep), 'en' ]]; }
}
***************
*** 328,331 ****
--- 328,332 ----
$directors =~ s/ (singer|actor|actress) //ig; # strip these words
$directors =~ s/,,/,/g; # delete empties
+ $directors = encode('utf-8', $directors); # encode names into utf-8
#debug $directors;
my @directors = split(/,/, $directors);
***************
*** 341,344 ****
--- 342,346 ----
$actors =~ s/ (singer|actor|actress) //ig; # strip these words
$actors =~ s/,,/,/g; # delete empties
+ $actors = encode('utf-8', $actors); # encode names into utf-8
#debug $actors;
my @actors = split(/,/, $actors);
***************
*** 487,491 ****
# Get the page containing the list of channels
! my $tree = XMLTV::Get_nice::get_nice_tree($channel_list);
# $tree->dump;
my $_channels = $tree->look_down('_tag' => 'span', 'id' => '_ctl0_main_channelList');
--- 489,493 ----
# Get the page containing the list of channels
! my $tree = XMLTV::Get_nice::get_nice_tree($channel_list, \&utf8);
# $tree->dump;
my $_channels = $tree->look_down('_tag' => 'span', 'id' => '_ctl0_main_channelList');
***************
*** 510,514 ****
$channels->{"$id"} = {
id => "$id",
! 'display-name' => [[ encode( 'utf-8', decode( 'windows-1255', $name)), 'en' ]],
url => [ $ROOT_URL.$url ]
};
--- 512,516 ----
$channels->{"$id"} = {
id => "$id",
! 'display-name' => [[ encode('utf-8', $name), 'en' ]],
url => [ $ROOT_URL.$url ]
};
***************
*** 630,634 ****
Output TV listings in XMLTV format for many channels available in UK.
! The data come from theguardian.co.uk
First you must run B<tv_grab_uk_guardian --configure> to choose which channels
--- 632,636 ----
Output TV listings in XMLTV format for many channels available in UK.
! The data come from L<http://theguardian.co.uk>
First you must run B<tv_grab_uk_guardian --configure> to choose which channels
***************
*** 640,644 ****
=head1 OPTIONS
! Please see tv_grab_uk_guardian --help
=head1 INSTALLATION
--- 642,646 ----
=head1 OPTIONS
! Please see B<tv_grab_uk_guardian --help>
=head1 INSTALLATION
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk