Package: fetchyahoo
Version: 2.8.6-4
Severity: wishlist
Tags: patch

Hi 

i made those change to fetchyahoo to make it easier to change
regex on the mail summary page. It s an improvment on the
previous patch which fix the breakage when yahoo mail changed
the page layout.

I made it after using mail yahoo with a text browser. In this
case yahoo mail changed to use another layout but i have not been
able to patch the code to manage this layout yet (it miss the new
old token to distinguish the mail, the other elements are not
changed much).

This may be usefull for someone else trying to manage this "text
mode" layout, or if the new layout change again. The regex was
pretty unreadable even for me who made it what it was ...


Ciao
Alban



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8)

Versions of packages fetchyahoo depends on:
ii  libcrypt-ssleay-perl          0.51-2     Support for https protocol in LWP
ii  libhtml-parser-perl           3.45-1     A collection of modules that parse
ii  libio-socket-ssl-perl         0.96-1     Class implementing an object orien
ii  libmime-perl                  5.415-2    Perl5 modules for MIME-compliant m
ii  liburi-perl                   1.30-1     Manipulates and accesses URI strin
ii  libwww-perl                   5.803-3    WWW client/server library for Perl
ii  perl                          5.8.4-5    Larry Wall's Practical Extraction 

-- no debconf information
--- /usr/bin/fetchyahoo 2004-10-24 20:31:04.000000000 +0200
+++ ./fetchyahoo        2005-01-27 12:06:00.007997880 +0100
@@ -830,7 +830,15 @@
   my $mail_size = '';
 
   # the long regex matches and removes a single message
-  while ( $tmpPage =~ s/^.*?^(\t+|\s+)*<tr class=msg(new|old).*?^(\t+|\s+)*<td 
.*?name="Mid" 
value="([0-9a-zA-Z._-]+)".*?^(\t+|\s+)*<td>(.*?)<.*?^<td>.*?^(\t+|\s+)*<a 
href=.*?ShowLetter\?MsgId=([0-9a-zA-Z._-]+).*?^((\t+|\s+)+|\n+)*(.*?)\n.*?^(\t+|\s+)*<td
 .*?>(.*?)<.*?^(\t+|\s+)*<td>(.*?)<//ms ) {
+  my $_regx_state = '^.*?(\t+|\s+)*<tr class=msg(new|old).*?'; # $2
+  my $_regx_idsum = '^(\t+|\s+)*<td .*?name="Mid" 
value="([0-9a-zA-Z._-]+)".*?'; # $4
+  my $_regx_from = '^(\t+|\s+)*<td>(.*?)<.*?^<td>.*?'; # $6
+  my $_regx_idmail = '^(\t+|\s+)*<a 
href=.*?ShowLetter\?MsgId=([0-9a-zA-Z._-]+).*?'; # $8
+  my $_regx_title = '?^((\t+|\s+)+|\n+)*(.*?)\n.*?'; # $11
+  my $_regx_date = '^(\t+|\s+)*<td .*?>(.*?)<.*?'; # $13
+  my $_regx_size = '^(\t+|\s+)*<td>(.*?)<'; # $15
+
+  while ( $tmpPage =~ 
s/$_regx_state.$_regx_idsum.$_regx_from.$_regx_idmail.$_regx_title.$_regx_date.$_regx_size//ms
 ) {
     $mail_state = "$2";
     $id_summary = "$4";
     $mail_from = "$6";

Reply via email to