2018/06/12

[python] text from url

import requests
import json
url = 'http://www.quotesondesign.com/wp-json/posts'
resp = requests.get(url)

# srting to Python data type
c_lst = json.loads(resp.text)

for txt in c_lst:
    # unpacking
    for key, value in txt.items():
        print(key, ' : ', value)

댓글 없음:

댓글 쓰기