Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
likaixiang2 committed Jun 13, 2019
1 parent e3f83db commit e0563ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions GFWeather.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ def get_dictum_info(self):
def text_reply(msg):
try:
if(robot_channel==1):
return getResponseTuling(msg.text)
return getResponseTuling(msg.get('Content'))
else:
return getResponseAikf(msg.text)
return getResponseAikf(msg.get('Content'))
except Exception as e:
print(e)
return "我还不知道哦"
Expand Down
2 changes: 1 addition & 1 deletion Robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self):

def getResponseAikf(msg):
t = str(int(round(time.time() * 1000)))
url = "http://www.aikf.com/ask/getAnswer.htm?&reqtype=1&tenantId=e1acc141f18a4f48922155ce2e178a7d&ques=" + msg + "&_=" + t
url = "http://www.aikf.com/ask/getAnswer.htm?reqtype=1&tenantId=e1acc141f18a4f48922155ce2e178a7d&ques=" + msg + "&_=" + t
response = requests.get(url).json()
answer = response['text']['content']
dr = re.compile(r'<[^>]+>', re.S)
Expand Down

0 comments on commit e0563ee

Please sign in to comment.