zhangqf 6 lat temu
rodzic
commit
b715f84e0c
3 zmienionych plików z 7 dodań i 2 usunięć
  1. 1 0
      src/AK_Agent.html
  2. 4 0
      src/order/OrderServer.py
  3. 2 2
      src/utils/CallbackOrderUtils.py

Plik diff jest za duży
+ 1 - 0
src/AK_Agent.html


+ 4 - 0
src/order/OrderServer.py

@@ -249,6 +249,7 @@ class OrderServer():
             "pageToken": "",
             "TimeZoneDiff": "480"
         }
+        self.session.cookies['i10c.bdddb'] = 'c2-f0103ZLNqAeI3BH6yYOfG7TZlRtCrMwzKDQfPMpdrBiHtspjoz4hG1gmlRTCqoP3KDqfQuYkuTrJ0zjBTuTfS8ZkqMupqjxVKDq7gmYkJNoptsolozTpvkQUSMtHlpVtKDQfPM0u5KY8oxo6uXRaGVZkqo8pgTsvP8rINHdKESnj9soBo01fLvZkQMtHHdplG8qkKNBiESNCtxyuZZBaGvZlOPoHQjxvly9WxxYkJNopssolozT4slZkqMupltWqPDGuoc0BESnCuVjBt3OftxZkqMtrloxBjRlkPHeIESnIoxRCozTaGVZkqk9c8jxvKEOfPMdfJ5nCtxjGUuTFBve3czUtRjxvKEOiKMDfJSCeoxo6uXOfGqelSMtHltY'  
         res = self.session.post("https://booking2.airasia.com/LoginAgent.aspx", data=logindata, verify=False, timeout=60)
         agentHomeUrl = res.url
         logging.info(self.salt+res.url)
@@ -260,6 +261,9 @@ class OrderServer():
         logging.info(self.salt+agentHomeUrl)
         logging.info(self.salt+str(self.logindata))
         htmlContent = res.text
+#         f = open('AK_Agent1.html', 'w',encoding='utf-8')
+#         f.write(res.text)
+#         f.close()
         isReload = 'window.location.reload'
         if isReload in htmlContent:
             res = self.session.get(agentHomeUrl)

+ 2 - 2
src/utils/CallbackOrderUtils.py

@@ -9,8 +9,8 @@ import string
 
 class CallbackOrderUtils():
     
-    #callbackurl = "http://123.103.51.83/mgr/"
-    callbackurl = "http://192.168.1.5:11009/"
+    callbackurl = "http://123.103.51.83/mgr/"
+    #callbackurl = "http://192.168.1.5:11009/"
     
     def __init__(self):
         self.salt = ''.join(random.sample(string.ascii_letters + string.digits, 16))+'|'