|
@@ -7,6 +7,7 @@ from functools import wraps
|
|
|
|
|
|
product_adress = "http://111.231.167.191"
|
|
|
test_address = "http://111.231.167.191:8004"
|
|
|
+test_address2 = "http://111.231.167.191:8003"
|
|
|
local_adress = "http://127.0.0.1:9000"
|
|
|
|
|
|
use_address = local_adress
|
|
@@ -135,10 +136,10 @@ def get_article2_1():
|
|
|
|
|
|
|
|
|
def download_word():
|
|
|
- from make_docx_demo.data import test_json1
|
|
|
+ from make_docx_demo.data import test_json2
|
|
|
params = {"document_format": 2, "scanpage_format": 1}
|
|
|
|
|
|
- r = requests.post(f"{use_address}/make_word/vocabulary_assault", params=params, json=test_json1)
|
|
|
+ r = requests.post(f"{use_address}/make_word/vocabulary_assault", params=params, json=test_json2)
|
|
|
r.raise_for_status()
|
|
|
suffix = {1: "docx", 2: "pdf"}[params['document_format']]
|
|
|
with open(f"test.{suffix}", "wb") as f:
|
|
@@ -199,6 +200,6 @@ if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
|
|
- print(get_article2_1())
|
|
|
|
|
|
+ download_word()
|
|
|
|