1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

tv.nrk.no website html change. Error when finding the video id.

This commit is contained in:
Svein Hansen 2016-05-26 23:09:47 +02:00
parent fa730a5564
commit 56a404686a

View File

@ -38,8 +38,10 @@ class Nrk(Service, OpenGraphThumbMixin):
if match is None:
match = re.search(r'video-id="([^"]+)"', self.get_urldata())
if match is None:
yield ServiceError("Can't find video id.")
return
match = re.search("<meta name=\"programid\".*?content=\"([^\"]*)\"", self.get_urldata())
if match is None:
yield ServiceError("Can't find video id.")
return
vid = match.group(1)
dataurl = "http://v8.psapi.nrk.no/mediaelement/%s" % vid
data = self.http.request("get", dataurl).text