1
0
Fork 0
mirror of https://github.com/Findus23/RadioStats.git synced 2024-09-19 16:03:48 +02:00
RadioStats/parser/ara.py
2018-03-20 07:44:34 +01:00

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