<reponame>weishaodaren/ShamGod
import requests
import json

def main():
    resp = requests.get('ttp://api.tianapi.com/txapi/duilian/index?key=<KEY>')
    data_model = json.loads(resp.text)
    for news in data_model['newslist']:
        print(news['title'])

if __name__ == '__main__':
    main()
import requests
import json

def main():
    resp = requests.get('ttp://api.tianapi.com/txapi/duilian/index?key=<KEY>')
    data_model = json.loads(resp.text)
    for news in data_model['newslist']:
        print(news['title'])

if __name__ == '__main__':
    main()