[mythtv-users] RE: [Xmltv-users] Figured out problem with tv_grab_na and long listings

David A. Mason damason at redshift.com
Thu Sep 4 02:23:20 EDT 2003


Well, I tried your changes once more, but against a CVS build of tv_grab_na,
and I'm probably matching your results.

Thanks a lot for this assistance.

Just out of curiosity, are you missing data for 170-176 (Nickelodeons,
Disneys, and Cartoon Networks) plus 168 (TNN, but who really cares about
that one?). Those seem to be the channels bringing about the failure without
your traps.

It's unfortunate, since, as a geek, my household is a Cartoon Network and
SciFi channel household, and now we won't have our proper balance!

This is turning into a real mailbomb, isn't it?

DAM

-----Original Message-----
From: Curtis Stanford [mailto:curtis at stanfordcomputing.com] 
Sent: Tuesday, September 02, 2003 16:44
To: David A. Mason
Subject: Re: [Xmltv-users] Figured out problem with tv_grab_na and long
listings


Here's a diff. I'm not a perl dood so my apologies for any gaffs:

--- ZapListings.pm      2003-09-02 17:42:41.000000000 -0600
+++ ZapListings.pm.new  2003-09-02 17:42:56.000000000 -0600
@@ -1012,6 +1012,8 @@
     for my $row (split(/<tr/, $html)) {
        # nuke everything leading up to first >
        # which amounts to html attributes of <tr used in split
+       my $rowlen=length($row);
+       next if ( $rowlen > 3526 );
        $row=~s/^[^>]*>//so;
        $row=~s/<\/tr>.*//so;

@@ -1325,6 +1327,8 @@
     for my $row (split(/<tr/, $html)) {
        # nuke everything leading up to first >
        # which amounts to html attributes of <tr used in split
+       my $rowlen=length($row);
+       next if ( $rowlen > 3526 );
        $row=~s/^[^>]*>//so;

        # skipif the split didn't end with a row end </tr>

On September 2, 2003 02:55 pm, you wrote:
> Sorry for being helpless, but could you post the change, the file to 
> modify, and the lines it will surround or replace in the file?
>
> Thanks,
> DAM
>
> -----Original Message-----
> From: xmltv-users-admin at lists.sourceforge.net
> [mailto:xmltv-users-admin at lists.sourceforge.net] On Behalf Of Curtis 
> Stanford
> Sent: Tuesday, September 02, 2003 11:06 AM
> To: xmltv-users at lists.sourceforge.net
> Subject: [Xmltv-users] Figured out problem with tv_grab_na and long 
> listings
>
>
> I think I've figured out this problem and fixed it in my version of 
> ZapListings. Check out this message:
>
> http://www.mail-archive.com/mon@linux.kernel.org/msg00853.html
>
> Seems there is a long standing bug with Perl's regexp code that chokes 
> on strings longer than 3526 characters. So, in ZapListings I checked 
> the length
>
> of $row and skipped it if it was over 3526. I may be missing some 
> channels but at least the thing now runs to completion.
>
> Curtis
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf 
> _______________________________________________
> Xmltv-users mailing list
> Xmltv-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xmltv-users




More information about the mythtv-users mailing list