xmltv/grab/fi/fi/source yle.pm,2.06,2.07
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/fi/fi/source
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30322
Modified Files:
yle.pm
Log Message:
Fix broken YLE grabber - UTF-8 decoding
Remove requirement for Date::Manip::Date package
Index: yle.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/source/yle.pm,v
retrieving revision 2.06
retrieving revision 2.07
diff -C2 -d -r2.06 -r2.07
*** yle.pm 20 Nov 2014 16:57:16 -0000 2.06
--- yle.pm 5 Dec 2014 18:58:49 -0000 2.07
***************
*** 13,17 ****
use strict;
use warnings;
! use Date::Manip::Date;
BEGIN {
--- 13,17 ----
use strict;
use warnings;
! use Date::Manip;
BEGIN {
***************
*** 39,43 ****
# Fetch & parse HTML
! my $root = fetchTree("http://$languages{$code}.yle.fi/tv/opas");
if ($root) {
--- 39,43 ----
# Fetch & parse HTML
! my $root = fetchTree("http://$languages{$code}.yle.fi/tv/opas", 'UTF-8');
if ($root) {
***************
*** 87,94 ****
# Fetch & parse HTML (do not ignore HTML5 <time>)
my $root = fetchTree("http://$languages{$code}.yle.fi/tv/opas?t=" . $today->ymdd(),
! undef, undef, 1);
if ($root) {
my @objects;
- my $date = Date::Manip::Date->new();
#
--- 87,93 ----
# Fetch & parse HTML (do not ignore HTML5 <time>)
my $root = fetchTree("http://$languages{$code}.yle.fi/tv/opas?t=" . $today->ymdd(),
! 'UTF-8', undef, 1);
if ($root) {
my @objects;
#
***************
*** 135,140 ****
if ($start && $end && $title && $desc) {
! $start = $date->parse($start->attr("datetime")) ? undef : $date->secs_since_1970_GMT();
! $end = $date->parse($end->attr("datetime")) ? undef : $date->secs_since_1970_GMT();
my $link = $title->find("a");
--- 134,139 ----
if ($start && $end && $title && $desc) {
! $start = UnixDate($start->attr("datetime"),qw/%s/);
! $end = UnixDate($end->attr("datetime"),qw/%s/);
my $link = $title->find("a");
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk