diff --git a/lib/svtplay_dl/service/radioplay.py b/lib/svtplay_dl/service/radioplay.py index 4f99461..372bca6 100644 --- a/lib/svtplay_dl/service/radioplay.py +++ b/lib/svtplay_dl/service/radioplay.py @@ -4,13 +4,13 @@ # pylint: disable=E1103 from __future__ import absolute_import -import sys import re import json import copy from svtplay_dl.service import Service from svtplay_dl.fetcher.http import HTTP +from svtplay_dl.utils import HTTPError from svtplay_dl.log import log @@ -18,7 +18,11 @@ class Radioplay(Service): supported_domains = ['radioplay.se'] def get(self, options): - match = re.search(r"RP.vcdData = ({.*});", self.get_urldata()) + try: + match = re.search(r"RP.vcdData = ({.*});", self.get_urldata()) + except HTTPError: + log.error("Can't get the page") + return if match: data = json.loads(match.group(1)) for i in list(data["station"]["streams"].keys()):