Skip to content

Commit

Permalink
更新一言地址
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-lzr committed Apr 10, 2020
1 parent 919be2d commit 0fe04fc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions EGPA_script_random_num.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,16 +436,17 @@ def givePresent(info):

# 一言
def YiYan():
url = 'https://api.ooopn.com/yan/api.php'
url = "https://v1.hitokoto.cn/"
try:
data = urllib.request.urlopen(url)
jsdate = json.loads(data.read())
yiyan = jsdate["hitokoto"]
'''info = {id,hitokoto,cat,catname,author,source,date '''
return yiyan
except urllib.error.HTTPError as e:
print("yiban_Automation_tool:如果我报错了,请在GitHub上联系原作者:", e)
yiyan = "学院加油,每日签到"
return yiyan
jsdate = json.loads(data.read())
yiyan = jsdate["hitokoto"]
'''info = {id,hitokoto,cat,catname,author,source,date'''
return yiyan


'''
Expand Down

0 comments on commit 0fe04fc

Please sign in to comment.