|
|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
(defparameter +nalunch/mobile-ua+ "Mozilla/5.0 (Linux; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.114 Mobile Safari/537.36"
|
|
|
"Mobile UA")
|
|
|
-(defparameter +nalunch/mobile-uri+ "https://www.nalunch.ru/Mobile/")
|
|
|
+(defparameter +nalunch/mobile-uri+ "https://www.nalunch.ru/Mobile")
|
|
|
(defparameter +nalunch/login-uri+ "https://www.nalunch.ru/Mobile/Account/Login")
|
|
|
(defparameter +nalunch/basicdata-calend+ "http://basicdata.ru/api/json/calend/")
|
|
|
|
|
|
@@ -27,7 +27,9 @@
|
|
|
:user-agent +nalunch/mobile-ua+)))
|
|
|
(when (search "id=\"LoginForm\"" response)
|
|
|
(error "Bad username or password"))
|
|
|
- response))
|
|
|
+ (if (search "<title>Чек</title>" response) ;; Reload feed page on 'Cheque'
|
|
|
+ (drakma:http-request +nalunch/mobile-uri+ :cookie-jar cookies :user-agent +nalunch/mobile-ua+)
|
|
|
+ response)))
|
|
|
|
|
|
(defun nalunch/recent (login pass &optional cookies)
|
|
|
(let ((cookies (or cookies (make-instance 'drakma:cookie-jar))))
|