From 83ad5733eda78c2ce7b46a7bf89e99b0c0d267f5 Mon Sep 17 00:00:00 2001 From: milaq Date: Sun, 21 Jul 2019 20:07:26 +0200 Subject: [PATCH] strip https in vtuner station urls --- ycast/vtuner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ycast/vtuner.py b/ycast/vtuner.py index 145997f..daca96f 100644 --- a/ycast/vtuner.py +++ b/ycast/vtuner.py @@ -7,6 +7,12 @@ def get_init_token(): return XML_HEADER + '0000000000000000' +def strip_https(url): + if url.startswith('https://'): + url = 'http://' + url[8:] + return url + + class Page: def __init__(self): self.items = [] @@ -88,7 +94,7 @@ class Station: self.uid = uid self.name = name self.description = description - self.url = url + self.url = strip_https(url) self.logo = logo self.genre = genre self.location = location