xmltv/grab Get_nice.pm,1.28,1.29

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

Modified Files:
	Get_nice.pm 
Log Message:
add support for HTML5 tags to older versions of TreeBuilder

Index: Get_nice.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/Get_nice.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Get_nice.pm	23 Jan 2014 09:25:49 -0000	1.28
--- Get_nice.pm	13 Apr 2014 16:12:17 -0000	1.29
***************
*** 34,38 ****
  # 0.005065 : add decode option to get_nice_tree()
  # 0.005065 : expose the LWP response object ($Response)
! our $VERSION = 0.005065;
  
  use base 'Exporter';
--- 34,39 ----
  # 0.005065 : add decode option to get_nice_tree()
  # 0.005065 : expose the LWP response object ($Response)
! # 0.005066 : support unknown tags in HTML::TreeBuilder ($IncludeUnknownTags)
! our $VERSION = 0.005066;
  
  use base 'Exporter';
***************
*** 44,47 ****
--- 45,50 ----
  our $FailOnError = 1; # Fail on fetch error
  our $Response; # LWP response object
+ our $IncludeUnknownTags = 0; # add support for HTML5 tags which are unknown to older versions of TreeBuilder (and therfore ignored by it)
+ 
  
  
***************
*** 80,84 ****
        $content = decode($codepage, $content);
      }
!     my $t = HTML::TreeBuilder->new()->parse($content) or die "cannot parse content of $uri\n";
      $t->eof;
      return $t;
--- 83,89 ----
        $content = decode($codepage, $content);
      }
!     my $t = HTML::TreeBuilder->new();
! 		$t->ignore_unknown(!$IncludeUnknownTags);
! 		$t->parse($content) or die "cannot parse content of $uri\n";
      $t->eof;
      return $t;


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
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.