mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 13:44:14 +01:00
nrk: dont crash if we can’t find id
This commit is contained in:
parent
84d13a9f0c
commit
cd9b18c91e
@ -22,8 +22,10 @@ class Nrk(Service, OpenGraphThumbMixin):
|
||||
return
|
||||
|
||||
# First, fint the video ID from the html document
|
||||
video_id = re.search("<meta name=\"programid\".*?content=\"([^\"]*)\"", self.get_urldata()).group(1)
|
||||
if video_id is None:
|
||||
match = re.search("<meta name=\"programid\".*?content=\"([^\"]*)\"", self.get_urldata())
|
||||
if match:
|
||||
video_id = match.group(1)
|
||||
else:
|
||||
yield ServiceError("Can't find video id.")
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user