+2007-02-05 OHASHI Akira <bg66@koka-in.org>
+
+ * mixi.el (mixi-curl-post-form): New function.
+ (mixi-curl-retrieve): Add the FORM-DATA argument.
+ (mixi-message-title-regexp): Fix regexp.
+ (mixi-message-content-regexp): Ditto.
+
2007-02-01 OHASHI Akira <bg66@koka-in.org>
* mixi.el (mixi-friend-nick-regexp): Follow the change of mixi.
(let ((form-data (mixi-make-form-data fields)))
(mixi-w3m-retrieve url form-data)))
-(defun mixi-curl-retrieve (url &optional post-data)
+(defun mixi-curl-retrieve (url &optional post-data form-data)
"Retrieve the URL and return gotten strings."
(with-temp-buffer
(if (fboundp 'set-buffer-multibyte)
(apply #'start-process "curl" (current-buffer)
mixi-curl-program
(append (if post-data '("-d" "@-"))
+ form-data
(list "-i" "-L" "-s"
"-b" mixi-curl-cookie-file
"-c" mixi-curl-cookie-file
(setq ret (decode-coding-string (buffer-string) mixi-coding-system))
(mixi-parse-buffer url ret post-data))))
+(defun mixi-curl-post-form (url fields)
+ (let (form-data)
+ (mapcar (lambda (field)
+ (push "-F" form-data)
+ (push (concat (car field) "="
+ (encode-coding-string (cdr field)
+ mixi-coding-system))
+ form-data))
+ fields)
+ (mixi-curl-retrieve url nil (reverse form-data))))
+
(defconst mixi-my-id-regexp
"<a href=\"add_diary\\.pl\\?id=\\([0-9]+\\)")
(defconst mixi-message-time-regexp
"<font COLOR=#996600>Æü\\(¡¡\\| \\)ÉÕ</font> : \\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\)»þ\\([0-9]+\\)ʬ ")
(defconst mixi-message-title-regexp
-"<font COLOR=#996600>·ï\\(¡¡\\| \\)̾</font> : \\(.+\\)\n?</td>")
+"<font COLOR=#996600>·ï\\(¡¡\\| \\)̾</font> : \\(.*\\)\n?</td>")
(defconst mixi-message-content-regexp
- "<tr><td CLASS=h120>\\(.+\\)</td></tr>")
+ "<tr><td CLASS=h120>\\(.*\\)</td></tr>")
(defun mixi-realize-message (message)
"Realize a MESSAGE."