* mixi.el (mixi-friend-nick-regexp): Follow the change of mixi.
authorbg66 <bg66>
Thu, 1 Feb 2007 01:06:21 +0000 (01:06 +0000)
committerbg66 <bg66>
Thu, 1 Feb 2007 01:06:21 +0000 (01:06 +0000)
(mixi-friend-name-regexp): Ditto.
(mixi-friend-sex-regexp): Ditto.
(mixi-friend-address-regexp): Ditto.
(mixi-friend-age-regexp): Ditto.
(mixi-friend-birthday-regexp): Ditto.
(mixi-friend-blood-type-regexp): Ditto.
(mixi-friend-birthplace-regexp): Ditto.
(mixi-friend-hobby-regexp): Ditto.
(mixi-friend-job-regexp): Ditto.
(mixi-friend-organization-regexp): Ditto.
(mixi-friend-profile-regexp): Ditto.
(mixi-realize-friend): Follow the change above.

ChangeLog
mixi.el

index ed038a2..ca61fa0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-02-01  OHASHI Akira  <bg66@koka-in.org>
+
+       * mixi.el (mixi-friend-nick-regexp): Follow the change of mixi.
+       (mixi-friend-name-regexp): Ditto.
+       (mixi-friend-sex-regexp): Ditto.
+       (mixi-friend-address-regexp): Ditto.
+       (mixi-friend-age-regexp): Ditto.
+       (mixi-friend-birthday-regexp): Ditto.
+       (mixi-friend-blood-type-regexp): Ditto.
+       (mixi-friend-birthplace-regexp): Ditto.
+       (mixi-friend-hobby-regexp): Ditto.
+       (mixi-friend-job-regexp): Ditto.
+       (mixi-friend-organization-regexp): Ditto.
+       (mixi-friend-profile-regexp): Ditto.
+       (mixi-realize-friend): Follow the change above.
+
 2007-01-31  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * mixi-wl.el: Use wl-draft-send-hook.
diff --git a/mixi.el b/mixi.el
index ac18a8f..c22dcf2 100644 (file)
--- a/mixi.el
+++ b/mixi.el
@@ -777,68 +777,71 @@ Increase this value when unexpected error frequently occurs."
   `(concat "/show_profile.pl?id=" (mixi-friend-id ,friend)))
 
 (defconst mixi-friend-nick-regexp
-  "<img \\(alt=\"\\*\" \\)?src=\"?http://img\\.mixi\\.jp/img/dot0\\.gif\"? \\(width\\|WIDTH\\)=\"?1\"? \\(height\\|HEIGHT\\)=\"?5\"?><br>\r?
+  "<img \\(alt=\"\\*\" \\)?src=\"?http://img\\.mixi\\.jp/img/dot0\\.gif\"? width=\"?1\"? height=\"?5\"?\\( /\\)?><br\\( /\\)?>\r?
 \\(.*\\)¤µ¤ó([0-9]+)")
 (defconst mixi-friend-name-regexp
-  "<td BGCOLOR=#F2DDB7 WIDTH=80 NOWRAP><font COLOR=#996600>̾\\(&nbsp;\\| \\)Á°</font></td>
+  "̾\\(&nbsp;\\| \\)Á°</font></td>
 
-?<td WIDTH=345>\\(.+?\\)\\(</td>\\|<img\\)")
+?<td width=\"?345\"?>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-sex-regexp
-  "<td BGCOLOR=#F2DDB7\\( WIDTH=80 NOWRAP\\)?><font COLOR=#996600>À­\\(&nbsp;\\| \\)ÊÌ</font></td>
+  "À­\\(&nbsp;\\| \\)ÊÌ</font></td>
 
-?<td WIDTH=345>\\([Ã˽÷]\\)À­\\(</td>\\|<img\\)")
+?<td width=\"?345\"?>\\([Ã˽÷]\\)À­\\(</td>\\| <img\\)")
 (defconst mixi-friend-address-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¸½½»½ê</font></td>\n<td>\\(.+\\)\\(\n.+\n\\)?</td></tr>")
+  "¸½½»½ê</font></td>
+<td>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-age-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>ǯ\\(&nbsp;\\| \\)Îð</font></td>\n<td>\\([0-9]+\\)ºÐ\\(\n.+\n\\)?</td></tr>")
+  "ǯ\\(&nbsp;\\| \\)Îð</font></td>\n<td>\\([0-9]+\\)ºÐ\\(</td>\\| <img\\)")
 (defconst mixi-friend-birthday-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>ÃÂÀ¸Æü</font></td>\n<td>\\([0-9]+\\)·î\\([0-9]+\\)Æü\\(\n.+\n\\)?</td></tr>")
+  "ÃÂÀ¸Æü</font></td>\n<td>\\([0-9]+\\)·î\\([0-9]+\\)Æü\\(</td>\\| <img\\)")
 (defconst mixi-friend-blood-type-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>·ì±Õ·¿</font></td>\n<td>\\([ABO]B?\\)·¿\\(\n\n\\)?</td></tr>")
+  "·ì±Õ·¿</font></td>\n<td>\\([ABO]B?\\)·¿\\(</td>\\| <img\\)")
 (defconst mixi-friend-birthplace-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>½Ð¿ÈÃÏ</font>\n?</td>\n<td>\\(.+\\)\\(\n.+\n\\)?</td></tr>")
+  "½Ð¿ÈÃÏ</font>\n?</td>\n<td>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-hobby-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¼ñ\\(&nbsp;\\| \\)Ì£</font></td>\n<td>\\(.+?\\)\\(</td>\\|<img\\)")
+  "¼ñ\\(&nbsp;\\| \\)Ì£</font></td>\n<td>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-job-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¿¦\\(&nbsp;\\| \\)¶È</font></td>\n<td>\\(.+\\)\\(\n.+\n\\)?</td></tr>")
+  "¿¦\\(&nbsp;\\| \\)¶È</font></td>\n<td>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-organization-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>½ê\\(&nbsp;\\| \\)°</font></td>\n<td[^>]*>\\(.+\\)\\(\n.+\n\\)?</td></tr>")
+  "½ê\\(&nbsp;\\| \\)°</font></td>\n<td[^>]*>\\(.+?\\)\\(</td>\\| <img\\)")
 (defconst mixi-friend-profile-regexp
-  "<td BGCOLOR=#F2DDB7><font COLOR=#996600>¼«¸Ê¾Ò²ð</font></td>\n<td CLASS=h120>\\(.+\\)</td></tr>")
+  "¼«¸Ê¾Ò²ð</font></td>
+<td class=\"?h120\"?>\\(.+\\)</td></tr>")
 
 (defun mixi-realize-friend (friend)
   "Realize a FRIEND."
   ;; FIXME: Check a expiration of cache?
   (unless (mixi-object-realized-p friend)
     (with-mixi-retrieve (mixi-friend-page friend)
-      (if (re-search-forward mixi-friend-nick-regexp nil t)
-         (mixi-friend-set-nick friend (match-string 4))
-       (mixi-realization-error 'cannot-find-nick friend))
-      (when (re-search-forward mixi-friend-name-regexp nil t)
-       (mixi-friend-set-name friend (match-string 2)))
-      (when (re-search-forward mixi-friend-sex-regexp nil t)
-       (mixi-friend-set-sex friend (if (string= (match-string 3) "ÃË")
-                                       'male 'female)))
-      (when (re-search-forward mixi-friend-address-regexp nil t)
-       (mixi-friend-set-address friend (match-string 1)))
-      (when (re-search-forward mixi-friend-age-regexp nil t)
-       (mixi-friend-set-age friend (string-to-number (match-string 2))))
-      (when (re-search-forward mixi-friend-birthday-regexp nil t)
-       (mixi-friend-set-birthday friend
-                                 (list (string-to-number (match-string 1))
-                                       (string-to-number (match-string 2)))))
-      (when (re-search-forward mixi-friend-blood-type-regexp nil t)
-       (mixi-friend-set-blood-type friend (intern (match-string 1))))
-      (when (re-search-forward mixi-friend-birthplace-regexp nil t)
-       (mixi-friend-set-birthplace friend (match-string 1)))
-      (when (re-search-forward mixi-friend-hobby-regexp nil t)
-       (mixi-friend-set-hobby friend (split-string (match-string 2) ", ")))
-      (when (re-search-forward mixi-friend-job-regexp nil t)
-       (mixi-friend-set-job friend (match-string 2)))
-      (when (re-search-forward mixi-friend-organization-regexp nil t)
-       (mixi-friend-set-organization friend (match-string 2)))
-      (when (re-search-forward mixi-friend-profile-regexp nil t)
-       (mixi-friend-set-profile friend (match-string 1))))
+      (let ((case-fold-search t))
+       (if (re-search-forward mixi-friend-nick-regexp nil t)
+           (mixi-friend-set-nick friend (match-string 4))
+         (mixi-realization-error 'cannot-find-nick friend))
+       (when (re-search-forward mixi-friend-name-regexp nil t)
+         (mixi-friend-set-name friend (match-string 2)))
+       (when (re-search-forward mixi-friend-sex-regexp nil t)
+         (mixi-friend-set-sex friend (if (string= (match-string 2) "ÃË")
+                                         'male 'female)))
+       (when (re-search-forward mixi-friend-address-regexp nil t)
+         (mixi-friend-set-address friend (match-string 1)))
+       (when (re-search-forward mixi-friend-age-regexp nil t)
+         (mixi-friend-set-age friend (string-to-number (match-string 2))))
+       (when (re-search-forward mixi-friend-birthday-regexp nil t)
+         (mixi-friend-set-birthday
+          friend (list (string-to-number (match-string 1))
+                       (string-to-number (match-string 2)))))
+       (when (re-search-forward mixi-friend-blood-type-regexp nil t)
+         (mixi-friend-set-blood-type friend (intern (match-string 1))))
+       (when (re-search-forward mixi-friend-birthplace-regexp nil t)
+         (mixi-friend-set-birthplace friend (match-string 1)))
+       (when (re-search-forward mixi-friend-hobby-regexp nil t)
+         (mixi-friend-set-hobby friend (split-string (match-string 2) ", ")))
+       (when (re-search-forward mixi-friend-job-regexp nil t)
+         (mixi-friend-set-job friend (match-string 2)))
+       (when (re-search-forward mixi-friend-organization-regexp nil t)
+         (mixi-friend-set-organization friend (match-string 2)))
+       (when (re-search-forward mixi-friend-profile-regexp nil t)
+         (mixi-friend-set-profile friend (match-string 1)))))
     (mixi-object-touch friend)))
 
 (defun mixi-friend-id (friend)