(funcall mixi-retrieve-function url post-data)))
(defmacro mixi-expand-url (url)
- `(concat mixi-url ,url))
+ `(if (string-match (concat "^" mixi-url) ,url)
+ ,url
+ (concat mixi-url ,url)))
(defun mixi-w3-retrieve (url &optional post-data)
"Retrieve the URL and return gotten strings."
(catch 'end
(while (or (null max-numbers) (< (length ids) max-numbers))
(with-mixi-retrieve (format url page)
- (let ((pos 0))
+ (let ((pos 0)
+ found)
(while (and (string-match regexp buffer pos)
(or (null max-numbers) (< (length ids) max-numbers)))
(let ((num 1)
(while (match-string num buffer)
(setq list (cons (match-string num buffer) list))
(incf num))
- (when (member (reverse list) ids)
- (throw 'end ids))
- (setq ids (cons (reverse list) ids))
+ (when (not (member (reverse list) ids))
+ (setq found t)
+ (setq ids (cons (reverse list) ids)))
(setq pos (match-end (1- num)))))
- (when (eq pos 0)
+ (when (not found)
(throw 'end ids))))
(incf page)))
;; FIXME: Sort? Now order by newest.
`(concat "/show_log.pl"))
(defconst mixi-log-list-regexp
- "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\) <a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.+\\)</a><br>")
+ "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\) <a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.*\\)</a></li>")
(defun mixi-get-logs (&optional max-numbers)
"Get logs."
"<td BGCOLOR=#F2DDB7><font COLOR=#996600>³«ÀßÆü</font></td>\n<td>\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü</td>")
;; FIXME: Care when the owner has seceded.
(defconst mixi-community-owner-regexp
- "<td BGCOLOR=#F2DDB7><font COLOR=#996600>´ÉÍý¿Í</font></td>\n<td>\n\n<a href=\"\\(home\\.pl\\|show_friend\\.pl\\?id=\\([0-9]+\\)\\)\">\n\\(.+\\)</a>")
+ "<td BGCOLOR=#F2DDB7><font COLOR=#996600>´ÉÍý¿Í</font></td>\n<td>\n\n<a href=\"\\(home\\.pl\\|show_friend\\.pl\\?id=\\([0-9]+\\)\\)\">\n\\(.*\\)</a>")
(defconst mixi-community-category-regexp
"<td BGCOLOR=#F2DDB7><font COLOR=#996600>¥«¥Æ¥´¥ê</font></td>\n<td>\\([^<]+\\)</td>")
(defconst mixi-community-members-regexp
"<td bgcolor=\"#fff4e0\"> \\([^<]+\\)</td>")
;; FIXME: Remove `¤µ¤ó'.
(defconst mixi-topic-owner-regexp
- "<td bgcolor=\"#fdf9f2\"> <font color=\"#dfb479\"></font> <a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.+\\)\\(¤µ¤ó\\)?</a>")
+ "<td bgcolor=\"#fdf9f2\"> <font color=\"#dfb479\"></font> <a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.*\\)\\(¤µ¤ó\\)?</a>")
(defconst mixi-topic-content-regexp
- "<td class=\"h120\"><table><tr>\\(.+\\)?</tr></table>\\(.+\\)</td>")
+ "<td class=\"h120\"><table><tr>\\(.+\\)?\n?\\(.+\\)?\n?\\(.+\\)?\n?</tr></table>\\(.+\\)</td>")
(defun mixi-topic-realize (topic)
"Realize a TOPIC."
(match-string 2 buffer)))
(signal 'error (list 'cannot-find-owner topic)))
(if (string-match mixi-topic-content-regexp buffer)
- (mixi-topic-set-content topic (match-string 2 buffer))
+ (mixi-topic-set-content topic (match-string 4 buffer))
(signal 'error (list 'cannot-find-content topic))))
(mixi-object-touch topic)))
<td ALIGN=center BGCOLOR=#FDF9F2 WIDTH=430>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"410\">
<tr>
-<td>
-<a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.+\\)</a>
+\\(<td>\\)
+<a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.*\\)</a>
\\(<font color=\"#f2ddb7\">|</font> <a href=[^>]+>ºï½ü</a>
</td></tr></table>")
(defun mixi-topic-comment-list-page (topic)
- (concat "/view_bbs.pl?page=%d"
+ (concat "/view_bbs.pl?page=all"
"&id=" (mixi-topic-id topic)
"&comm_id=" (mixi-community-id (mixi-topic-community topic))))
<td rowspan=\"2\" width=\"110\" bgcolor=\"#f2ddb7\" align=\"center\" nowrap>
\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü<br>
\\([0-9]+\\):\\([0-9]+\\)<br>
-</td>
+\\(<input type=\"checkbox\" name=\"comment_id\" value=\".+\">
+\\|\\)</td>
<td bgcolor=\"#fdf9f2\"> <font color=\"#f8a448\">
<b>[^<]+</b>:</font>
\\(
-\\|\\)<a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.+\\)</a>
+\\|\\) *<a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.*\\)</a>
-\\(
+?\\(
\\|\\)</td>
</tr>
(funcall list-page parent) max-numbers regexp)))
(mapcar (lambda (item)
(mixi-make-comment parent (mixi-make-friend
- (nth 6 item) (nth 7 item))
+ (nth 7 item) (nth 8 item))
(encode-time
0
(string-to-number (nth 4 item))
(string-to-number (nth 2 item))
(string-to-number (nth 1 item))
(string-to-number (nth 0 item)))
- (nth 9 item)))
+ (nth 10 item)))
items))))
(defmacro mixi-new-comment-list-page ()
max-numbers
mixi-new-comment-list-regexp)))
(mapcar (lambda (item)
- (let ((diary (mixi-make-diary
- (mixi-make-friend (nth 1 item))
- (nth 0 item))))
- (mixi-get-comments diary)))
+ ;; FIXME: Return comments?
+ (mixi-make-diary (mixi-make-friend (nth 1 item)) (nth 0 item)))
items)))
;; Message object.
"&box=" (mixi-message-box ,message)))
(defconst mixi-message-owner-regexp
- "<font COLOR=#996600>º¹½Ð¿Í</font> : <a HREF=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.+\\)</a>")
+ "<font COLOR=#996600>º¹½Ð¿Í</font> : <a HREF=\"show_friend\\.pl\\?id=\\([0-9]+\\)\">\\(.*\\)</a>")
(defconst mixi-message-title-regexp
"<font COLOR=#996600>·ï¡¡Ì¾</font> : \\(.+\\)
</td>")
(defconst mixi-introduction-list-regexp
"<tr bgcolor=#FFFFFF>
<td WIDTH=150 background=http://img\\.mixi\\.jp/img/bg_line\\.gif align=\"center\"><a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\"><img src=\".+\" border=0><br>
-\\(.+\\)</td></a>
+\\(.*\\)</td></a>
<td WIDTH=480>
\\(´Ø·¸¡§.+<br>
(defconst mixi-my-introduction-list-regexp
"<tr bgcolor=#FFFFFF>
<td WIDTH=150 background=http://img\\.mixi\\.jp/img/bg_line\\.gif align=\"center\"><a href=\"show_friend\\.pl\\?id=\\([0-9]+\\)\"><img src=\".+\" border=0><br>
-\\(.+\\)</td></a>
+\\(.*\\)</td></a>
<td WIDTH=480>