xmltv/grab/fi/fi/source yle.pm,2.05,2.06

Stefan Becker <[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-serv13810/grab/fi/fi/source

Modified Files:
	yle.pm 
Log Message:
- yle: previous "fix" by Rene was only working correctly for channel() and grab("today")
- yle: switch to updated URL format with different host names per language
- test.conf: update with new channels found by yle source


Index: yle.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/source/yle.pm,v
retrieving revision 2.05
retrieving revision 2.06
diff -C2 -d -r2.05 -r2.06
*** yle.pm	14 Nov 2014 14:54:46 -0000	2.05
--- yle.pm	20 Nov 2014 16:57:16 -0000	2.06
***************
*** 26,29 ****
--- 26,34 ----
  sub description { 'yle.fi' }
  
+ my %languages = (
+     "fi" => "ohjelmaopas",
+     "sv" => "programguide",
+ );
+ 
  # Grab channel list
  sub channels {
***************
*** 31,38 ****
  
    # yle.fi offers program guides in multiple languages
!   foreach my $code ("fi", "sv") {
  
      # Fetch & parse HTML
!     my $root = fetchTree("http://ohjelmaopas.yle.fi/lang/$code?path=tv/opas");
      if ($root) {
  
--- 36,43 ----
  
    # yle.fi offers program guides in multiple languages
!   foreach my $code (sort keys %languages) {
  
      # Fetch & parse HTML
!     my $root = fetchTree("http://$languages{$code}.yle.fi/tv/opas");
      if ($root) {
  
***************
*** 81,85 ****
  
    # Fetch & parse HTML (do not ignore HTML5 <time>)
! 	my $root = fetchTree("http://ohjelmaopas.yle.fi/lang/$code?path=tv/opas&t=" . $today->ymdd(),
  		       undef, undef, 1);
    if ($root) {
--- 86,90 ----
  
    # 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) {


------------------------------------------------------------------------------
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=157005751&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.