|
@@ -30,7 +30,8 @@
|
|
|
(:name . ("td:nth-of-type(2)"))
|
|
(:name . ("td:nth-of-type(2)"))
|
|
|
(:city . ("td:nth-of-type(3)"))
|
|
(:city . ("td:nth-of-type(3)"))
|
|
|
(:phone . ("td:nth-of-type(4)"))
|
|
(:phone . ("td:nth-of-type(4)"))
|
|
|
- (:comment . ("td:nth-of-type(5)"))))
|
|
|
|
|
|
|
+ (:comment . ("td:nth-of-type(5)"))
|
|
|
|
|
+ (:photos . ("td:nth-of-type(5) a" :attr :href :multiple t))))
|
|
|
(:init . (("https://www.6annonce.com/private/signin")
|
|
(:init . (("https://www.6annonce.com/private/signin")
|
|
|
".signin-box form"
|
|
".signin-box form"
|
|
|
(("username" . annonce-login)
|
|
(("username" . annonce-login)
|
|
@@ -59,10 +60,14 @@
|
|
|
(loop for (name . res) in results append res))
|
|
(loop for (name . res) in results append res))
|
|
|
|
|
|
|
|
(defun format-blacklist (item)
|
|
(defun format-blacklist (item)
|
|
|
- (format nil "~A, ~A: ~A *~A*~%~A"
|
|
|
|
|
|
|
+ (format nil "~A, ~A: ~A *~A*~%~A~@[~%~A~]"
|
|
|
(agets item :date) (agets item :city)
|
|
(agets item :date) (agets item :city)
|
|
|
(agets item :name) (agets item :phone)
|
|
(agets item :name) (agets item :phone)
|
|
|
- (agets item :comment)))
|
|
|
|
|
|
|
+ (agets item :comment)
|
|
|
|
|
+ (when (agets item :photos)
|
|
|
|
|
+ (format nil "~{[pic~A](~A)~^, ~}"
|
|
|
|
|
+ (loop for i from 1 for p in (agets item :photos)
|
|
|
|
|
+ append (list i p))))))
|
|
|
|
|
|
|
|
(defun handle-blacklist (chat-id query)
|
|
(defun handle-blacklist (chat-id query)
|
|
|
(with-chat-cookies (chat-id *chat-cookie-jars*)
|
|
(with-chat-cookies (chat-id *chat-cookie-jars*)
|
|
@@ -72,7 +77,7 @@
|
|
|
(text-chunks (mapcar #'format-blacklist results)
|
|
(text-chunks (mapcar #'format-blacklist results)
|
|
|
:pre-pre "" :pre-post "")
|
|
:pre-pre "" :pre-post "")
|
|
|
"Not found")
|
|
"Not found")
|
|
|
- :parse-mode "markdown" :disable-web-preview "true"))))
|
|
|
|
|
|
|
+ :parse-mode "markdown"))))
|
|
|
|
|
|
|
|
(def-message-cmd-handler handler-cmd-blacklist (:blacklist :bl)
|
|
(def-message-cmd-handler handler-cmd-blacklist (:blacklist :bl)
|
|
|
(cond
|
|
(cond
|