python API;

    1. import requests
    2. import time
    3. import re
    4. import json
    5. se = requests.session()
    6. if __name__ == '__main__':
    7. print("============汇率=================")
    8. Post_url = "http://op.juhe.cn/onebox/exchange/query?key=4556032807b2e13080e701863f991c5d" #自己想办法弄到key
    9. Text = se.post(Post_url).text
    10. j = json.loads(Text)
    11. l = j['result']['list']
    12. time = j['result']['update']
    13. print(time)
    14. print(l[0])
    15. print("=========新华字典=============")
    16. url = "http://v.juhe.cn/xhzd/query?key=5dbf088550b5e459f0559d2688a498b0&word=好"
    17. text = se.post(url).text
    18. j = json.loads(text)
    19. print(j['result']['pinyin'])