10 lines
225 B
Python
Executable File
10 lines
225 B
Python
Executable File
#!/bin/python3
|
|
|
|
import requests
|
|
import sys
|
|
|
|
req = requests.get(f'https://wttr.in/{sys.argv[1]}?format="%t:%c:%C"').text[1:-1].split(':')
|
|
|
|
print('{' + f'"text": "{req[0]} {req[1]}", "tooltip": "", "class": "{req[2]}"' + '}')
|
|
|