From b2f9ce65f199b33f4441ce8d2e33101336cc080e Mon Sep 17 00:00:00 2001 From: "xianping.wen" <931128603@qq.com> Date: Fri, 27 Sep 2019 17:00:18 +0800 Subject: [PATCH] update --- UnitTest/TestAll.py | 22 +++++++++++++++++++++- config/urlConf.py | 2 +- inter/GetRandCode.py | 5 ++++- verify/localVerifyCode.py | 4 ++-- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/UnitTest/TestAll.py b/UnitTest/TestAll.py index 24f53dc..8a5885a 100644 --- a/UnitTest/TestAll.py +++ b/UnitTest/TestAll.py @@ -78,6 +78,26 @@ class testAll(unittest.TestCase): t = threading.Thread(target=v.verify, args=(base64Image,)) t.start() + def testRemoteVerfy(self): + """ + + :return: + """ + import requests + import time + while True: + try: + starttime = time.time() + rsp = requests.post(url="http://34.97.127.118:8000/verify/base64/", + data={ + 'imageFile': '/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAC+ASUDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ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F/8AXroKKOZgc9/wjH/T5/5C/wDr1V+IPgpfHmgwaW999jWK6W4L+T5m7Cuu3GRj72c+1dXRUt33A8Vi/Z5tI8btfZyO7Wn/ANnVpfgTFGrLHrqIGB6WA/P79ewUVHs4hY8Rk/Z73zCQeKMEEH/jwyT+PmVG37OuZ/MXxTt9B/Z/T/yLXuVFPkiKyPCpP2cQ7EjxURlt3On5P/o2mn9m4FiR4rxn/qHf/bf84r3einZDPCT+zhlcf8JWemP+Qf8A/baiH7NRUgjxaOn/AEDf/tte90UJWAKKKKYHACAMAIEhDCIMJMsnMdkaIbgA/9kKCg=='}, + timeout=60, + ) + print(rsp.content) + print(f"响应时间{time.time()-starttime}m") + except: + pass + if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main() diff --git a/config/urlConf.py b/config/urlConf.py index 08df50c..6dcb5ab 100755 --- a/config/urlConf.py +++ b/config/urlConf.py @@ -591,7 +591,7 @@ urls = { "req_url": "/verify/base64/", "req_type": "post", "Referer": "", - "Host": "34.97.127.118:8000/", + "Host": "34.97.127.118:8000", "re_try": 2, "re_time": 2, "s_time": 2, diff --git a/inter/GetRandCode.py b/inter/GetRandCode.py index 7e97bea..43a04c5 100644 --- a/inter/GetRandCode.py +++ b/inter/GetRandCode.py @@ -4,8 +4,11 @@ from PIL import Image from config.urlConf import urls from myUrllib.httpUtils import HTTPClient from verify.localVerifyCode import Verify +import TickerConfig -v = Verify() + +if TickerConfig.AUTO_CODE_TYPE == 2: + v = Verify() def getRandCode(is_auto_code, auto_code_type, result): diff --git a/verify/localVerifyCode.py b/verify/localVerifyCode.py index 2a9c24c..06564e6 100644 --- a/verify/localVerifyCode.py +++ b/verify/localVerifyCode.py @@ -42,8 +42,6 @@ def base64_to_image(base64_code): return img - - class Verify: def __init__(self): self.textModel = "" @@ -54,6 +52,8 @@ class Verify: def loadTextModel(self): if not self.textModel: self.textModel = models.load_model(PATH('../model.v2.0.h5')) + else: + print("无需加载模型model.v2.0.h5") def loadImgModel(self): if not self.imgModel: