xmltv/grab/it tv_grab_it.in,1.105,1.106

Geoff <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/it
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30705

Modified Files:
	tv_grab_it.in 
Log Message:
fix broken mtv.it grabber (website changes)

Index: tv_grab_it.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/it/tv_grab_it.in,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** tv_grab_it.in	4 Nov 2014 12:00:56 -0000	1.105
--- tv_grab_it.in	19 Jun 2015 15:05:50 -0000	1.106
***************
*** 218,225 ****
  
       'mtvit' =>
!      { domain => 'tv.mtv.it',
!        base_chan => 'http://tv.mtv.it/',
!        base_data => 'http://tv.mtv.it/',
!        rturl => "http://tv.mtv.it/guida-tv/",
         needs_login => 0,
         needs_cookies => 0,
--- 218,225 ----
  
       'mtvit' =>
!      { domain => 'www.mtv.it',
!        base_chan => 'http://www.mtv.it/',
!        base_data => 'http://www.mtv.it/',
!        rturl => "http://www.mtv.it/tv/guida-tv/",
         needs_login => 0,
         needs_cookies => 0,
***************
*** 1005,1009 ****
  
      #my $url = $backend_info{mtvit}{base_data}.'?canaleSel=MTV&giorno_guid='.$giorno.'%2F'.$mese.'%2F'.$anno;
!     my $url = $backend_info{mtvit}{base_data}.'guidatv.php?tvguidedate='.$anno.'-'.$mese.'-'.$giorno;
  
      warn ($DEF_LANG eq 'eng' ?
--- 1005,1010 ----
  
      #my $url = $backend_info{mtvit}{base_data}.'?canaleSel=MTV&giorno_guid='.$giorno.'%2F'.$mese.'%2F'.$anno;
!     #my $url = $backend_info{mtvit}{base_data}.'guidatv.php?tvguidedate='.$anno.'-'.$mese.'-'.$giorno;            #  http://tv.mtv.it/guidatv.php?tvguidedate=2015-06-19
!     my $url = $backend_info{mtvit}{base_data}.'tv/guida-tv/'.$anno.'-'.$mese.'-'.$giorno;    # http://www.mtv.it/tv/guida-tv/2015-06-21
  
      warn ($DEF_LANG eq 'eng' ?
***************
*** 1022,1048 ****
      } 
  
      #$content=~/<ol id=\"broadcasts\">(.*)?<div id=\"rightColumn\">/s; $content=$1;	
!     $content=~/<ul class="video_carousel tv">(.*?)<\/ul>/s; $content=$1;	
      $content=~s/[\n|\r]+//gm;
      my @programmes = ();
      warn "VERBOSE: parsing...\n" if ($opt_verbose);
  
!     my @lines = split /<li>/, $content;
  
      #split the lines
      foreach my $line (@lines) {
        #next unless $line=~/span class=\'time\'/;
!       next unless $line=~/div class="time"/;
  
      #   <span class='time'>07:00</span><h3>NEWS</h3><p>Le notizie del giorno una finestra sull'attualita' e la cronaca.</p></li>
      #$line=~/<span class=\'time\'>(.*?)<\/span><h3>(.*?)<\/h3><p>(.*?)<\/p>/;
      
      # <div class="time">07:30</div>...<h3 class="ondemand">MTV News</h3><p>Il telegiornale di MTV con le notizie piu' importanti del giorno. #MTVNEWS</p>
!     $line=~/div class="time">(.*?)<\/div>.*?<h3.*?>(.*?)<\/h3>\s*<p>(.*?)<\/p>/;
! 
!     my %programme = ();
!     my ($title, $time_start, $description) = ($2, $1, $3);
!     
!     if ($title=~/<a href.*?>(.*?)<\/a/) {$title = $1;}
  
      # Three mandatory fields: title, start, channel.
--- 1023,1058 ----
      } 
  
+     #$content=~/colonna centrale(.*)colonna destra/s; $content=$1;
      #$content=~/<ol id=\"broadcasts\">(.*)?<div id=\"rightColumn\">/s; $content=$1;	
!     #$content=~/<ul class="video_carousel tv">(.*?)<\/ul>/s; $content=$1;	
!     $content=~/<ul class="tvguide canale1">(.*?)<\/ul>/s; $content=$1;	
      $content=~s/[\n|\r]+//gm;
      my @programmes = ();
      warn "VERBOSE: parsing...\n" if ($opt_verbose);
  
!     my @lines = split /<li/, $content;
! 		
!     # <li class="hh5"  data-mtv-epg-desc="Capodanno a Palm Springs. E&#039; la notte di San Silvestro e Jay decide di portare la famiglia a festeggiare in un hotel di Palm Springs di cui ha buoni ricordi. Ma il locale non e&#039; piu&#039; come un tempo..." data-mtv-epg-title="Modern Family" data-mtv-epg-date='13:35' data-mtv-epg-dateend='14:00'><span class="date">13:35</span><b><span class="inside"><span>Modern Family</span></b></li>
  
      #split the lines
      foreach my $line (@lines) {
        #next unless $line=~/span class=\'time\'/;
!       #next unless $line=~/div class="time"/;
!       next unless $line=~/span class="date"/;
  
+     my %programme = ();
+ 		
      #   <span class='time'>07:00</span><h3>NEWS</h3><p>Le notizie del giorno una finestra sull'attualita' e la cronaca.</p></li>
      #$line=~/<span class=\'time\'>(.*?)<\/span><h3>(.*?)<\/h3><p>(.*?)<\/p>/;
      
      # <div class="time">07:30</div>...<h3 class="ondemand">MTV News</h3><p>Il telegiornale di MTV con le notizie piu' importanti del giorno. #MTVNEWS</p>
!     #$line=~/div class="time">(.*?)<\/div>.*?<h3.*?>(.*?)<\/h3>\s*<p>(.*?)<\/p>/;
!     #my ($title, $time_start, $description) = ($2, $1, $3);
!     #if ($title=~/<a href.*?>(.*?)<\/a/) {$title = $1;}
! 		
!     #$line=~/data-mtv-epg-desc="(.*?)".*?data-mtv-epg-title="(.*?)".*?data-mtv-epg-date=['"](\d\d:\d\d)?['"].*?data-mtv-epg-dateend=['"](\d\d:\d\d)?['"]/;
! 		(my $title) = $line=~ /data-mtv-epg-title=['"](.*?)['"]/;
! 		(my $time_start) = $line=~ /data-mtv-epg-date=['"](\d\d:\d\d)?['"]/;
! 		(my $description) = $line=~ /data-mtv-epg-desc=['"](.*?)['"]/;
  
      # Three mandatory fields: title, start, channel.


------------------------------------------------------------------------------
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.