projects
/
elisp
/
mixi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8a89abe
)
Revert the last change.
author
bg66
<bg66>
Fri, 1 Dec 2006 02:28:52 +0000
(
02:28
+0000)
committer
bg66
<bg66>
Fri, 1 Dec 2006 02:28:52 +0000
(
02:28
+0000)
ChangeLog
patch
|
blob
|
history
mixi.el
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index
95523fb
..
2fe21ba
100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,14
+1,5
@@
2006-12-01 OHASHI Akira <bg66@koka-in.org>
2006-12-01 OHASHI Akira <bg66@koka-in.org>
- * mixi.el (mixi-topic-comment-list-page): Use `%d' instead of `all'.
- (mixi-event-comment-list-page): Ditto.
- (mixi-url-retrieve): Fix for `HTTP/1.0 500 Internal Server Error' of
- BBS page.
- (mixi-w3m-retrieve): Ditto.
- (mixi-curl-retrieve): Ditto.
-
-2006-12-01 OHASHI Akira <bg66@koka-in.org>
-
* mixi.el (mixi-parse-buffer): Rename from `mixi-retrieve-1', and
swap `buffer' argument and `url'.
(mixi-url-retrieve): Follow the change above.
* mixi.el (mixi-parse-buffer): Rename from `mixi-retrieve-1', and
swap `buffer' argument and `url'.
(mixi-url-retrieve): Follow the change above.
diff --git
a/mixi.el
b/mixi.el
index
c46688d
..
5715b15
100644
(file)
--- a/
mixi.el
+++ b/
mixi.el
@@
-254,17
+254,17
@@
Increase this value when unexpected error frequently occurs."
(error (mixi-message "Cannot retrieve")))
(with-current-buffer buffer
(goto-char (point-min))
(error (mixi-message "Cannot retrieve")))
(with-current-buffer buffer
(goto-char (point-min))
- (if (re-search-forward "HTTP/[0-9]+\\.[0-9]+ 302" nil t)
+ (if (re-search-forward "HTTP/[0-9.]+ 302 Moved" nil t)
(if (re-search-forward
(concat "Location: " mixi-url "\\(.+\\)") nil t)
(setq ret (mixi-url-retrieve (match-string 1) post-data))
(setq ret (mixi-url-retrieve "/home.pl" post-data)))
(if (re-search-forward
(concat "Location: " mixi-url "\\(.+\\)") nil t)
(setq ret (mixi-url-retrieve (match-string 1) post-data))
(setq ret (mixi-url-retrieve "/home.pl" post-data)))
- ;; Allow `500' because BBS page might return
- ;; `HTTP/1.0 500 Internal Server Error'.
- (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ [25]00")
+ (unless (re-search-forward "HTTP/[0-9.]+ 200 OK" nil t)
(error (mixi-message "Cannot retrieve")))
(error (mixi-message "Cannot retrieve")))
- (delete-region (point) (re-search-forward "\r?\n\r?\n"))
- (setq ret (decode-coding-string (buffer-string) mixi-coding-system))
+ (search-forward "\n\n")
+ (setq ret (decode-coding-string
+ (buffer-substring-no-properties (point) (point-max))
+ mixi-coding-system))
(kill-buffer buffer)
(setq ret (mixi-parse-buffer url ret post-data))))
ret))
(kill-buffer buffer)
(setq ret (mixi-parse-buffer url ret post-data))))
ret))
@@
-273,11
+273,11
@@
Increase this value when unexpected error frequently occurs."
"Retrieve the URL and return gotten strings."
(let ((url (mixi-expand-url url)))
(with-temp-buffer
"Retrieve the URL and return gotten strings."
(let ((url (mixi-expand-url url)))
(with-temp-buffer
- ;; Don't check return code of `w3m-retrieve' because BBS page might
- ;; return `HTTP/1.0 500 Internal Server Error'.
- (w3m-retrieve url nil nil post-data)
- (w3m-decode-buffer url)
- (mixi-parse-buffer url (buffer-string) post-data))))
+ (if (not (string= (w3m-retrieve url nil nil post-data) "text/html"))
+ (error (mixi-message "Cannot retrieve"))
+ (w3m-decode-buffer url)
+ (let ((ret (buffer-substring-no-properties (point-min) (point-max))))
+ (mixi-parse-buffer url ret post-data))))))
(defun mixi-curl-retrieve (url &optional post-data)
"Retrieve the URL and return gotten strings."
(defun mixi-curl-retrieve (url &optional post-data)
"Retrieve the URL and return gotten strings."
@@
-309,9
+309,7
@@
Increase this value when unexpected error frequently occurs."
(goto-char (point-min))
(while (looking-at "HTTP/[0-9]+\\.[0-9]+ [13][0-9][0-9]")
(delete-region (point) (re-search-forward "\r?\n\r?\n")))
(goto-char (point-min))
(while (looking-at "HTTP/[0-9]+\\.[0-9]+ [13][0-9][0-9]")
(delete-region (point) (re-search-forward "\r?\n\r?\n")))
- ;; Allow `500' because BBS page might return
- ;; `HTTP/1.0 500 Internal Server Error'.
- (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ [25]00")
+ (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ 200")
(error (mixi-message "Cannot retrieve")))
(delete-region (point) (re-search-forward "\r?\n\r?\n"))
(setq ret (decode-coding-string (buffer-string) mixi-coding-system))
(error (mixi-message "Cannot retrieve")))
(delete-region (point) (re-search-forward "\r?\n\r?\n"))
(setq ret (decode-coding-string (buffer-string) mixi-coding-system))
@@
-1769,7
+1767,7
@@
Increase this value when unexpected error frequently occurs."
</td></tr></table>")
(defun mixi-topic-comment-list-page (topic)
</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))))
"&id=" (mixi-topic-id topic)
"&comm_id=" (mixi-community-id (mixi-topic-community topic))))
@@
-1804,7
+1802,7
@@
Increase this value when unexpected error frequently occurs."
</tr>")
(defun mixi-event-comment-list-page (event)
</tr>")
(defun mixi-event-comment-list-page (event)
- (concat "/view_event.pl?page=%d"
+ (concat "/view_event.pl?page=all"
"&id=" (mixi-event-id event)
"&comm_id=" (mixi-community-id (mixi-event-community event))))
"&id=" (mixi-event-id event)
"&comm_id=" (mixi-community-id (mixi-event-community event))))