Message409409
This is a little closer to the current code. Also it has a simpler and more universal url.
from urllib.request import urlopen
url = 'http://worldtimeapi.org/api/timezone/etc/UTC.txt'
with urlopen(url) as request:
for line in request:
line = line.decode('utf-8')
if line.startswith('datetime'):
print(line)
datetime: 2021-12-31T08:23:15.083004+00:00 |
|
Date |
User |
Action |
Args |
2021-12-31 08:24:59 | rhettinger | set | recipients:
+ rhettinger, docs@python, vivekvashist |
2021-12-31 08:24:59 | rhettinger | set | messageid: <1640939099.01.0.293764191482.issue46079@roundup.psfhosted.org> |
2021-12-31 08:24:59 | rhettinger | link | issue46079 messages |
2021-12-31 08:24:58 | rhettinger | create | |
|