From: Chris J. <ch...@je...> - 2009-05-15 20:51:58
|
Dear Jon, I thought I might have escaped further problems, but yesterday I found that my messages had ceased downloading, with the notorious "Error 3, retrying" problem. I don't know which version of fetchyahoo you're using, because the code you posted differs from what I have in the current (2.13.3) version of fetchyahoo. I applied your first correction (Adding "Transitional") by replacing line 1023: $mainPage =~ /^<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01\/\/EN"/ || with $mainPage =~ /^<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN"/ || and made the equivalent change to line 1041. It took me a while to find where to apply the second correction. The relevant line had moved from 1149 (your version) to 1140 (v. 2.13.3): $tmpPage =~ s/<tr class="(msgnew|msgold)".*?name="mid".*?value="([^"]+)".*?href="(.*?mid=)([^&]*).*?td title="([^"]*)".*?"title="([^"]*)".*?<td.*?>(.*?)<\/td><td>(.*?)<\/td><\/tr>//ms) Putting the class in quotes has already been done in the latest version, but removing the second title hadn't been done: $tmpPage =~ s/<tr class="(msgnew|msgold)".*?name="mid".*?value="([^"]+)".*?href="(.*?mid=)([^&]*).*?td title="([^"]*)".*?<td.*?>(.*?)<\/td><td>(.*?)<\/td><\/tr>//ms) After these fixes fetchyahoo was able to download again. Thanks! Chris On Tue, 12 May 2009, Jon Baumgartner wrote: > On 5/11/2009 10:33 AM, Joshua D. Curry wrote: >> Spoke too soon. Problem is back. Getting Error 3 and no other error >> messages. Any ideas? > I managed to fix this, at least for me. > > I added a bunch of debug info, so line numbers are probably not exact. > First, I noticed that the doc type was transitional, so I changed line > 1025 from > > $mainPage =~ /^<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML > 4.01\/\/EN"/ || > > to > > $mainPage =~ /^<!DOCTYPE HTML PUBLIC "-\/\/W3C\/\/DTD HTML 4.01 > Transitional\/\/EN"/ || > > I did that at line 1043, as well. > > This worked, in that it gave me a message count, but then it went into > an infinite loop. It appears to be choking on one of the regex's: > > In line 1149, I changed this: > > $tmpPage =~ s/<tr > class=(msgnew|msgold).*?name="mid".*?value="([^"]+)".*?href="(.*?mid=)([^&]*).*?td > title="([^"]*)".*?"title="([^"]*)".*?<td.*?>(.*?)<\/td><td>(.*?)<\/td><\/tr>//ms) > > to this: > > $tmpPage =~ s/<tr > class="(msgnew|msgold)".*?name="mid".*?value="([^"]+)".*?href="(.*?mid=)([^&]*).*?td > title="([^"]*)".*?<td.*?>(.*?)<\/td><td>(.*?)<\/td><\/tr>//ms) > > I enclosed the class in double quotes, and removed the second title > match. That seems to have done the trick for me, although it does throw > some warnings: > > Use of uninitialized value in concatenation (.) or string at > ./fetchyahoo line 1226. > > Line 1226 is > > if ($msgcount > $maxMessages) { > > Hope this helps. > > jon |