mirror of
https://github.com/Findus23/RadioStats.git
synced 2024-09-19 16:03:48 +02:00
15 lines
551 B
Python
15 lines
551 B
Python
from utils import *
|
|
|
|
URL = "http://www.arabella.at/live-feed/ajax.php?station=zenon-rp-wien"
|
|
|
|
|
|
def get(channel):
|
|
response=fetch(URL, True)
|
|
if response:
|
|
for track in response["songs"]:
|
|
artist = track["artist"]
|
|
title = track["title"]
|
|
dt = track["start_date_time"]
|
|
time = datetime(year=int(dt["year"]), month=int(dt["month"]), day=int(dt["day"]),
|
|
hour=int(dt["hours"]), minute=int(dt["minutes"]), second=int(dt["seconds"]))
|
|
yield time, artist, title
|