Commit 37fcb255 by 陈森彬

update

parent 2c73cee1
Showing with 5 additions and 1 deletions
...@@ -425,6 +425,10 @@ def check_price(kw_info): ...@@ -425,6 +425,10 @@ def check_price(kw_info):
if res: if res:
return res[0][0].strip() return res[0][0].strip()
else: else:
res = price_num_pattern.findall(kw_info)
if res and "+" not in kw_info:
return res[0].strip()
else:
return False return False
......
...@@ -222,7 +222,7 @@ class ImHandler(tornado.web.RequestHandler): ...@@ -222,7 +222,7 @@ class ImHandler(tornado.web.RequestHandler):
kw_word = kw_word.replace(num_res, "") kw_word = kw_word.replace(num_res, "")
price_res = check_price(kw_word + " ") price_res = check_price(kw_word + " ")
if price_res: if price_res and data_obj["gn"]:
data_obj["price"] = price_res data_obj["price"] = price_res
if k_res or pcs_res or num_res or price_res: if k_res or pcs_res or num_res or price_res:
new_cut_info = new_cut_info.replace(list_info, "") new_cut_info = new_cut_info.replace(list_info, "")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment