mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
radioplay: http-rewrite
This commit is contained in:
parent
6f12640e1e
commit
bbba883570
@ -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 = ({.*});</script>", self.get_urldata())
|
||||
try:
|
||||
match = re.search(r"RP.vcdData = ({.*});</script>", 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()):
|
||||
|
Loading…
Reference in New Issue
Block a user