Last active
July 13, 2023 16:25
-
-
Save Axel-Erfurt/5106f9bbef1fca1d63bb74a849607128 to your computer and use it in GitHub Desktop.
die aktuellen Livestreams der öffentlich rechtlichen Sender auslesen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
import json | |
url = "https://raw.githubusercontent.com/mediathekview/MServer/master/dist/live-streams.json" | |
data = requests.get(url).text | |
js = json.loads(data) | |
def parse_object_pairs(pairs): | |
return pairs | |
decoder = json.JSONDecoder(object_pairs_hook=parse_object_pairs) | |
obj = decoder.decode(data) | |
for value in obj[2:]: | |
print(f'{value[1][2].replace(" Livestream", "")}:\n{value[1][8]}') | |
Author
Axel-Erfurt
commented
Jul 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment