(defconst mixi-community-nodata-regexp
"^¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó")
(defconst mixi-community-name-regexp
- "<td WIDTH=345>\\(.*\\)</td></tr>")
+ "<td width=\"?345\"?>\\(.*\\)</td></tr>")
(defconst mixi-community-birthday-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>³«ÀßÆü</font></td>
-<td WIDTH=345>\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü")
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>³«ÀßÆü</font></td>
+<td width=\"?345\"?>\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü")
;; FIXME: Care when the owner has seceded.
(defconst mixi-community-owner-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>´ÉÍý¿Í</font></td>
-<td WIDTH=345>
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>´ÉÍý¿Í</font></td>
+<td width=\"?345\"?>
<table style=\"width: 100%;\"><tr><td>
<a href=\"\\(home\\.pl\\|show_friend\\.pl\\?id=\\([0-9]+\\)\\)\">\\(.*\\)</a>")
(defconst mixi-community-category-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>¥«¥Æ¥´¥ê</font></td>
-<td WIDTH=345>\\([^<]+\\)</td>")
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>¥«¥Æ¥´¥ê</font></td>
+<td width=\"?345\"?>\\([^<]+\\)</td>")
(defconst mixi-community-members-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>¥á¥ó¥Ð¡¼¿ô</font></td>
-<td WIDTH=345>\\([0-9]+\\)¿Í</td></tr>")
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>¥á¥ó¥Ð¡¼¿ô</font></td>
+<td width=\"?345\"?>\\([0-9]+\\)¿Í</td></tr>")
(defconst mixi-community-open-level-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>»²²Ã¾ò·ï¤È<br>¸ø³«¥ì¥Ù¥ë</font></td>
-<td WIDTH=345>\\(.+\\)</td></tr>")
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>»²²Ã¾ò·ï¤È<br />¸ø³«¥ì¥Ù¥ë</font></td>
+<td width=\"?345\"?>\\(.+\\)</td></tr>")
(defconst mixi-community-authority-regexp
- "<td BGCOLOR=#F2DDB7 WIDTH=80><font COLOR=#996600>¥È¥Ô¥Ã¥¯ºîÀ®¤Î¸¢¸Â</font></td>
-<td WIDTH=345>\\(.+\\)</td></tr>")
+ "<td bgcolor=\"?#F2DDB7\"? width=\"?80\"?><font color=\"?#996600\"?>¥È¥Ô¥Ã¥¯ºîÀ®¤Î¸¢¸Â</font></td>
+<td width=\"?345\"?>\\(.+\\)</td></tr>")
(defconst mixi-community-description-regexp
- "<td CLASS=h120 WIDTH=345>\\(.+\\)</td>")
+ "<td class=\"?h120\"? width=\"?345\"?>\\(.+\\)</td>")
(defun mixi-realize-community (community)
"Realize a COMMUNITY."
;; FIXME: Check a expiration of cache?
(unless (mixi-object-realized-p community)
(with-mixi-retrieve (mixi-community-page community)
- (if (re-search-forward mixi-community-nodata-regexp nil t)
- ;; FIXME: Set all members?
- (mixi-community-set-name community "¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó")
- (if (re-search-forward mixi-community-name-regexp nil t)
- (mixi-community-set-name community (match-string 1))
- (mixi-realization-error 'cannot-find-name community))
- (if (re-search-forward mixi-community-birthday-regexp nil t)
- (mixi-community-set-birthday
- community (encode-time 0 0 0 (string-to-number (match-string 3))
- (string-to-number (match-string 2))
- (string-to-number (match-string 1))))
- (mixi-realization-error 'cannot-find-birthday community))
- (if (re-search-forward mixi-community-owner-regexp nil t)
- (if (string= (match-string 1) "home.pl")
- (mixi-community-set-owner community (mixi-make-me))
- (mixi-community-set-owner community
- (mixi-make-friend (match-string 2)
- (match-string 3))))
- (mixi-realization-error 'cannot-find-owner community))
- (if (re-search-forward mixi-community-category-regexp nil t)
- (mixi-community-set-category community (match-string 1))
- (mixi-realization-error 'cannot-find-category community))
- (if (re-search-forward mixi-community-members-regexp nil t)
- (mixi-community-set-members community
- (string-to-number (match-string 1)))
- (mixi-realization-error 'cannot-find-members community))
- (if (re-search-forward mixi-community-open-level-regexp nil t)
- (mixi-community-set-open-level community (match-string 1))
- (mixi-realization-error 'cannot-find-open-level community))
- (if (re-search-forward mixi-community-authority-regexp nil t)
- (mixi-community-set-authority community (match-string 1))
- (mixi-realization-error 'cannot-find-authority community))
- (if (re-search-forward mixi-community-description-regexp nil t)
- (mixi-community-set-description community (match-string 1))
- (mixi-realization-error 'cannot-find-description community))))
+ (let ((case-fold-search t))
+ (if (re-search-forward mixi-community-nodata-regexp nil t)
+ ;; FIXME: Set all members?
+ (mixi-community-set-name community "¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó")
+ (if (re-search-forward mixi-community-name-regexp nil t)
+ (mixi-community-set-name community (match-string 1))
+ (mixi-realization-error 'cannot-find-name community))
+ (if (re-search-forward mixi-community-birthday-regexp nil t)
+ (mixi-community-set-birthday
+ community (encode-time 0 0 0
+ (string-to-number (match-string 3))
+ (string-to-number (match-string 2))
+ (string-to-number (match-string 1))))
+ (mixi-realization-error 'cannot-find-birthday community))
+ (if (re-search-forward mixi-community-owner-regexp nil t)
+ (if (string= (match-string 1) "home.pl")
+ (mixi-community-set-owner community (mixi-make-me))
+ (mixi-community-set-owner community (mixi-make-friend
+ (match-string 2)
+ (match-string 3))))
+ (mixi-realization-error 'cannot-find-owner community))
+ (if (re-search-forward mixi-community-category-regexp nil t)
+ (mixi-community-set-category community (match-string 1))
+ (mixi-realization-error 'cannot-find-category community))
+ (if (re-search-forward mixi-community-members-regexp nil t)
+ (mixi-community-set-members community
+ (string-to-number (match-string 1)))
+ (mixi-realization-error 'cannot-find-members community))
+ (if (re-search-forward mixi-community-open-level-regexp nil t)
+ (mixi-community-set-open-level community (match-string 1))
+ (mixi-realization-error 'cannot-find-open-level community))
+ (if (re-search-forward mixi-community-authority-regexp nil t)
+ (mixi-community-set-authority community (match-string 1))
+ (mixi-realization-error 'cannot-find-authority community))
+ (if (re-search-forward mixi-community-description-regexp nil t)
+ (mixi-community-set-description community (match-string 1))
+ (mixi-realization-error 'cannot-find-description community)))))
(mixi-object-touch community)))
(defun mixi-community-id (community)