From: bg66 Date: Thu, 1 Feb 2007 01:06:21 +0000 (+0000) Subject: * mixi.el (mixi-friend-nick-regexp): Follow the change of mixi. X-Git-Tag: mixi-el-1_0_0~77 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d44e929f709aec44a5cfca627da01efbc36adfcf;p=elisp%2Fmixi.git * 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. --- diff --git a/ChangeLog b/ChangeLog index ed038a2..ca61fa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-02-01 OHASHI Akira + + * 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 * mixi-wl.el: Use wl-draft-send-hook. diff --git a/mixi.el b/mixi.el index ac18a8f..c22dcf2 100644 --- 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 - "
? + " ? \\(.*\\)¤µ¤ó([0-9]+)") (defconst mixi-friend-name-regexp - "̾\\( \\| \\)Á° + "̾\\( \\| \\)Á° -?\\(.+?\\)\\(\\|\\(.+?\\)\\(\\| À­\\( \\| \\)ÊÌ + "À­\\( \\| \\)ÊÌ -?\\([Ã˽÷]\\)À­\\(\\|\\([Ã˽÷]\\)À­\\(\\| ¸½½»½ê\n\\(.+\\)\\(\n.+\n\\)?") + "¸½½»½ê +\\(.+?\\)\\(\\| ǯ\\( \\| \\)Îð\n\\([0-9]+\\)ºÐ\\(\n.+\n\\)?") + "ǯ\\( \\| \\)Îð\n\\([0-9]+\\)ºÐ\\(\\| ÃÂÀ¸Æü\n\\([0-9]+\\)·î\\([0-9]+\\)Æü\\(\n.+\n\\)?") + "ÃÂÀ¸Æü\n\\([0-9]+\\)·î\\([0-9]+\\)Æü\\(\\| ·ì±Õ·¿\n\\([ABO]B?\\)·¿\\(\n\n\\)?") + "·ì±Õ·¿\n\\([ABO]B?\\)·¿\\(\\| ½Ð¿ÈÃÏ\n?\n\\(.+\\)\\(\n.+\n\\)?") + "½Ð¿ÈÃÏ\n?\n\\(.+?\\)\\(\\| ¼ñ\\( \\| \\)Ì£\n\\(.+?\\)\\(\\|\n\\(.+?\\)\\(\\| ¿¦\\( \\| \\)¶È\n\\(.+\\)\\(\n.+\n\\)?") + "¿¦\\( \\| \\)¶È\n\\(.+?\\)\\(\\| ½ê\\( \\| \\)°\n]*>\\(.+\\)\\(\n.+\n\\)?") + "½ê\\( \\| \\)°\n]*>\\(.+?\\)\\(\\| ¼«¸Ê¾Ò²ð\n\\(.+\\)") + "¼«¸Ê¾Ò²ð +\\(.+\\)") (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)