|
@@ -94,7 +94,7 @@ def get_parent_single_page(log, page):
|
|
|
data = {
|
|
data = {
|
|
|
"encryptionBodyParams": req_data
|
|
"encryptionBodyParams": req_data
|
|
|
}
|
|
}
|
|
|
- response = requests.post(url, headers=headers, json=data)
|
|
|
|
|
|
|
+ response = requests.post(url, headers=headers, json=data,timeout=11)
|
|
|
# print(response.text)
|
|
# print(response.text)
|
|
|
response.raise_for_status()
|
|
response.raise_for_status()
|
|
|
|
|
|
|
@@ -233,7 +233,7 @@ def get_child_single_page(log, page, parentId):
|
|
|
data = {
|
|
data = {
|
|
|
"encryptionBodyParams": req_data
|
|
"encryptionBodyParams": req_data
|
|
|
}
|
|
}
|
|
|
- response = requests.post(url, headers=headers, json=data)
|
|
|
|
|
|
|
+ response = requests.post(url, headers=headers, json=data, timeout=11)
|
|
|
# print(response.text)
|
|
# print(response.text)
|
|
|
response.raise_for_status()
|
|
response.raise_for_status()
|
|
|
|
|
|
|
@@ -283,7 +283,7 @@ def parse_child_list(log, list_data, sql_pool, parentId, expansion_series, expan
|
|
|
"description": description,
|
|
"description": description,
|
|
|
"crawler_language": crawler_language
|
|
"crawler_language": crawler_language
|
|
|
}
|
|
}
|
|
|
- print(data_dict)
|
|
|
|
|
|
|
+ # print(data_dict)
|
|
|
info_list.append(data_dict)
|
|
info_list.append(data_dict)
|
|
|
|
|
|
|
|
if info_list:
|
|
if info_list:
|
|
@@ -396,7 +396,7 @@ def get_series_single_page(log, item_tuple, page):
|
|
|
data = {
|
|
data = {
|
|
|
"encryptionBodyParams": req_data
|
|
"encryptionBodyParams": req_data
|
|
|
}
|
|
}
|
|
|
- response = requests.post(url, headers=headers, json=data)
|
|
|
|
|
|
|
+ response = requests.post(url, headers=headers, json=data, timeout=11)
|
|
|
# print(response.text)
|
|
# print(response.text)
|
|
|
response.raise_for_status()
|
|
response.raise_for_status()
|
|
|
decrypted_res = pokemon_aes_decrypt(response.text)
|
|
decrypted_res = pokemon_aes_decrypt(response.text)
|
|
@@ -537,7 +537,7 @@ def get_details_page(log, card_id, item_tuple, sql_pool):
|
|
|
# "encryptionUrlParams": "%2BsGoBpMkJzVjwAgE2Gca2Q%3D%3D"
|
|
# "encryptionUrlParams": "%2BsGoBpMkJzVjwAgE2Gca2Q%3D%3D"
|
|
|
"encryptionUrlParams": req_data
|
|
"encryptionUrlParams": req_data
|
|
|
}
|
|
}
|
|
|
- response = requests.get(url, headers=headers, params=params)
|
|
|
|
|
|
|
+ response = requests.get(url, headers=headers, params=params, timeout=11)
|
|
|
# print('response.text:', response.text)
|
|
# print('response.text:', response.text)
|
|
|
response.raise_for_status()
|
|
response.raise_for_status()
|
|
|
|
|
|
|
@@ -622,11 +622,11 @@ def jz_pokemon_main(log):
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
|
# 获取分类列表
|
|
# 获取分类列表
|
|
|
- log.debug(".......... 获取分类列表 ..........")
|
|
|
|
|
- try:
|
|
|
|
|
- get_parent_list(log, sql_pool)
|
|
|
|
|
- except Exception as e:
|
|
|
|
|
- log.error(f"{sys._getframe().f_code.co_name} Request get_parent_list error: {e}")
|
|
|
|
|
|
|
+ # log.debug(".......... 获取分类列表 ..........")
|
|
|
|
|
+ # try:
|
|
|
|
|
+ # get_parent_list(log, sql_pool)
|
|
|
|
|
+ # except Exception as e:
|
|
|
|
|
+ # log.error(f"{sys._getframe().f_code.co_name} Request get_parent_list error: {e}")
|
|
|
|
|
|
|
|
# 获取商品详情
|
|
# 获取商品详情
|
|
|
log.debug(f"........... 获取商品详情 ..........")
|
|
log.debug(f"........... 获取商品详情 ..........")
|