|
@@ -15,7 +15,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 . (("http://www.tescort.com/private/signin")
|
|
(:init . (("http://www.tescort.com/private/signin")
|
|
|
".signin-box form"
|
|
".signin-box form"
|
|
|
(("username" . tescort-login)
|
|
(("username" . tescort-login)
|
|
@@ -36,17 +37,52 @@
|
|
|
".signin-box form"
|
|
".signin-box form"
|
|
|
(("username" . annonce-login)
|
|
(("username" . annonce-login)
|
|
|
("password" . annonce-pass))))
|
|
("password" . annonce-pass))))
|
|
|
- (:validate . "#header .sitemenu-logged"))))
|
|
|
|
|
|
|
+ (:validate . "#header .sitemenu-logged"))
|
|
|
|
|
+ (:escortnews
|
|
|
|
|
+ (:scrape (:request . ("https://my.escortnews.eu/ajax.php"
|
|
|
|
|
+ :method :post
|
|
|
|
|
+ :content (("s" . q)
|
|
|
|
|
+ ("action" . "viewBlacklistRecords")
|
|
|
|
|
+ ("page" . "1") ("s1" . "date") ("s2" . "0") ("m" . "0"))))
|
|
|
|
|
+ (:processor . en-request)
|
|
|
|
|
+ (:items . ".blacklist .record")
|
|
|
|
|
+ (:info (:date . ("ul li:nth-of-type(1)"))
|
|
|
|
|
+ (:name . ("ul li:nth-of-type(2)"))
|
|
|
|
|
+ (:phone . ("ul li:nth-of-type(3)"))
|
|
|
|
|
+ (:city . ("ul li:nth-of-type(4)"))
|
|
|
|
|
+ (:email . ("ul li:nth-of-type(5)"))
|
|
|
|
|
+ (:comment . (".text" :child 6))))
|
|
|
|
|
+ (:init . (("https://my.escortnews.eu/")
|
|
|
|
|
+ "#form_PopUp"
|
|
|
|
|
+ (("username" . escortnews-login)
|
|
|
|
|
+ ("password" . escortnews-pass))))
|
|
|
|
|
+ (:validate . ".countSearchBar"))
|
|
|
|
|
+ ))
|
|
|
|
|
+
|
|
|
|
|
+(defun en-request (url &rest args &key method parameters content headers basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent (object-as :alist))
|
|
|
|
|
+ (declare (ignore method parameters basic-auth cookie-jar keep-alive use-connection-pool timeout ssl-key-file ssl-cert-file ssl-key-password stream verbose proxy insecure ca-path user-agent))
|
|
|
|
|
+ (remf args :object-as)
|
|
|
|
|
+ (when content
|
|
|
|
|
+ (push (cons :content-type "application/json") headers))
|
|
|
|
|
+ (multiple-value-bind (body status headers uri)
|
|
|
|
|
+ (apply #'http-request url args)
|
|
|
|
|
+ (unless (stringp body)
|
|
|
|
|
+ (setf body (babel:octets-to-string body :encoding :utf-8)))
|
|
|
|
|
+ (values (plump:parse (agets (yason:parse body :object-as object-as) "html")) status headers uri)))
|
|
|
|
|
|
|
|
(defvar *tescort-login*)
|
|
(defvar *tescort-login*)
|
|
|
(defvar *tescort-pass*)
|
|
(defvar *tescort-pass*)
|
|
|
(defvar *annonce-login*)
|
|
(defvar *annonce-login*)
|
|
|
(defvar *annonce-pass*)
|
|
(defvar *annonce-pass*)
|
|
|
|
|
+(defvar *escortnews-login*)
|
|
|
|
|
+(defvar *escortnews-pass*)
|
|
|
(defun get-common-context ()
|
|
(defun get-common-context ()
|
|
|
`((tescort-login . ,*tescort-login*)
|
|
`((tescort-login . ,*tescort-login*)
|
|
|
(tescort-pass . ,*tescort-pass*)
|
|
(tescort-pass . ,*tescort-pass*)
|
|
|
(annonce-login . ,*annonce-login*)
|
|
(annonce-login . ,*annonce-login*)
|
|
|
- (annonce-pass . ,*annonce-pass*)))
|
|
|
|
|
|
|
+ (annonce-pass . ,*annonce-pass*)
|
|
|
|
|
+ (escortnews-login . ,*escortnews-login*)
|
|
|
|
|
+ (escortnews-pass . ,*escortnews-pass*)))
|
|
|
|
|
|
|
|
(defun search-blacklists (query)
|
|
(defun search-blacklists (query)
|
|
|
(let ((context (append (get-common-context)
|
|
(let ((context (append (get-common-context)
|
|
@@ -79,7 +115,7 @@
|
|
|
"Not found")
|
|
"Not found")
|
|
|
:parse-mode "markdown"))))
|
|
:parse-mode "markdown"))))
|
|
|
|
|
|
|
|
-(def-message-cmd-handler handler-cmd-blacklist (:blacklist :bl)
|
|
|
|
|
|
|
+(def-message-admin-cmd-handler handler-cmd-blacklist (:blacklist :bl)
|
|
|
(cond
|
|
(cond
|
|
|
((null args) (bot-send-message chat-id "Enter query")
|
|
((null args) (bot-send-message chat-id "Enter query")
|
|
|
(on-next-message chat-id
|
|
(on-next-message chat-id
|