|
|
|
@ -314,5 +314,18 @@ def get_refine_count(q_id: str, count: int = 5):
|
|
|
|
return model
|
|
|
|
return model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_record_info(body: bytes, sep: Union[str, bytes] = b'\n'):
|
|
|
|
|
|
|
|
resp_texts = body.strip().split(sep)
|
|
|
|
|
|
|
|
query_id = None
|
|
|
|
|
|
|
|
records_found = 0
|
|
|
|
|
|
|
|
for resp_text in resp_texts:
|
|
|
|
|
|
|
|
resp_row_dict: dict = json.loads(resp_text)
|
|
|
|
|
|
|
|
if resp_row_dict.get("key") == "searchInfo":
|
|
|
|
|
|
|
|
query_id = resp_row_dict.get("payload", {}).get("QueryID")
|
|
|
|
|
|
|
|
records_found = resp_row_dict.get("payload", {}).get("RecordsFound") # 找到的记录
|
|
|
|
|
|
|
|
break # 找到就结束
|
|
|
|
|
|
|
|
return query_id, records_found
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
m1 = lite_base_model(WosDB.WOS)
|
|
|
|
m1 = lite_base_model(WosDB.WOS)
|
|
|
|
|