PageRenderTime 64ms CodeModel.GetById 58ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 1ms

/Web/search.py

https://github.com/dcbriccetti/python-lessons
Python | 5 lines | 4 code | 1 blank | 0 comment | 0 complexity | 05f6c80d9a6ef9bbb1c61a1104b67339 MD5 | raw file
1import requests
2
3search_arg = 'Guido von Rossum'
4response = requests.get('https://api.duckduckgo.com/?q=%s&format=json&pretty=1' % search_arg).json()
5print('From {}: {}'.format(response['AbstractSource'], response['Abstract']))