Another fix for HULU
This commit is contained in:
parent
31aa7d19c7
commit
3efc534b10
@ -202,6 +202,8 @@ class Hulu(BaseService):
|
|||||||
try:
|
try:
|
||||||
track.psshWV = next(x.psshWV for x in tracks.videos if x.psshWV)
|
track.psshWV = next(x.psshWV for x in tracks.videos if x.psshWV)
|
||||||
except: pass
|
except: pass
|
||||||
|
if not track.psshWV and not track.psshPR:
|
||||||
|
raise ValueError("No PSSH found in tracks.videos")
|
||||||
|
|
||||||
if self.acodec:
|
if self.acodec:
|
||||||
tracks.audios = [x for x in tracks.audios if (x.codec or "")[:4] == self.AUDIO_CODEC_MAP[self.acodec]]
|
tracks.audios = [x for x in tracks.audios if (x.codec or "")[:4] == self.AUDIO_CODEC_MAP[self.acodec]]
|
||||||
@ -235,7 +237,7 @@ class Hulu(BaseService):
|
|||||||
data=challenge # expects bytes
|
data=challenge # expects bytes
|
||||||
)
|
)
|
||||||
self.log.debug(res.text) if self.playready else self.log.debug(res.content)
|
self.log.debug(res.text) if self.playready else self.log.debug(res.content)
|
||||||
return base64.b64encode(res.text.encode()).decode() if self.playready else res.content
|
return res.text if self.playready else res.content
|
||||||
|
|
||||||
# Service specific functions
|
# Service specific functions
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user