xmltv/grab/fi/fi/source telkku.pm,2.03,2.04

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-serv24884/grab/fi/fi/source

Modified Files:
	telkku.pm 
Log Message:
- telkku: fix movie detection


Index: telkku.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/source/telkku.pm,v
retrieving revision 2.03
retrieving revision 2.04
diff -C2 -d -r2.03 -r2.04
*** telkku.pm	1 Nov 2013 22:55:13 -0000	2.03
--- telkku.pm	19 Jun 2014 20:57:16 -0000	2.04
***************
*** 96,102 ****
      $ids{__DUMMY_ID_THAT_NEVER_MATCHES__}++;
  
!     # Fetch & parse HTML
      # This is entirely optional, so please don't abort on failure...
!     my $root = fetchTree("http://www.telkku.com/movie", undef, 1);
      if ($root) {
        my $test;
--- 96,102 ----
      $ids{__DUMMY_ID_THAT_NEVER_MATCHES__}++;
  
!     # Fetch & parse HTML (do not ignore HTML5 <section>)
      # This is entirely optional, so please don't abort on failure...
!     my $root = fetchTree("http://www.telkku.com/movie", undef, 1, 1);
      if ($root) {
        my $test;
***************
*** 105,129 ****
        # Document structure for movie entries:
        #
!       # <div id="movieItems">
!       #   ...
!       #   <div class="movieItem">
!       #     <span class="heading">
!       #       <a href="http://www.telkku.fi/program/show/2011100211009">Aikuinen nainen</a>
!       #     </span>
!       #     ...
!       #   </div>
!       #   ...
!       # </div>
        #
!       if (my @list = $root->look_down("class" => "movieItem")) {
  	debug(2, "Source telkku.com found " . scalar(@list) . " movies");
  	foreach my $list_entry (@list) {
! 	  if (my $heading = $list_entry->look_down("class" => "heading")) {
! 	    if (my $link = $heading->find("a")) {
! 	      my $href = $link->attr("href");
! 	      if (defined($href) && length($href)) {
! 		debug(3, "movie ID: " . $href);
  		$ids{$href}++;
- 	      }
  	    }
  	  }
--- 105,125 ----
        # Document structure for movie entries:
        #
!       #  <li class="l-embed theme-hr program">
!       #    ...
!       #    <section class="l-embed__bd program__content">
!       #      <a href="http://www.telkku.com/program/show/2014061910151">
!       #        ...
!       #      </a>
!       #    </section>
!       #  </li>
        #
!       if (my @list = $root->look_down("class" => qr/program__content/)) {
  	debug(2, "Source telkku.com found " . scalar(@list) . " movies");
  	foreach my $list_entry (@list) {
! 	  if (my $link = $list_entry->find("a")) {
! 	    my $href = $link->attr("href");
! 	    if (defined($href) && length($href)) {
! 	      debug(3, "movie ID: " . $href);
  		$ids{$href}++;
  	    }
  	  }


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
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.