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