14 lines
194 B
Python
Executable File
14 lines
194 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import requests
|
|
|
|
res = requests.get('https://zenquotes.io/api/random')
|
|
|
|
if not res:
|
|
exit(1)
|
|
|
|
json = res.json()
|
|
data = json[0]
|
|
|
|
print(f"{data['q']}\n -- {data['a']}")
|