Skip to content

plugins.nrk: error: Unable to validate JSON #5407

@werid

Description

@werid

Checklist

Streamlink version

Latest stable release

Description

NRK appears to have removed statistics from the json at https://psapi.nrk.no/playback/metadata/channel/nrk1?eea-portability=true which breaks the plugin.

Extracting the m3u8 link from the browser and using it works.

Debug log

[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.11.0
[cli][debug] Streamlink: 5.5.1
[cli][debug] Dependencies:
[cli][debug]  certifi: 2022.9.24
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.2
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.18.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.29.0
[cli][debug]  urllib3: 1.26.13
[cli][debug]  websocket-client: 1.4.2
[cli][debug] Arguments:
[cli][debug]  url=https://tv.nrk.no/direkte/nrk1
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --ffmpeg-ffmpeg=C:\Program Files (x86)\Streamlink\ffmpeg\ffmpeg.exe
[cli][info] Found matching plugin nrk for URL https://tv.nrk.no/direkte/nrk1
error: Unable to validate JSON: ValidationError(AnySchema):
  ValidationError(dict):
    Unable to validate value of key 'statistics'
    Context(dict):
      Unable to validate value of key 'luna'
      Context(AnySchema):
        ValidationError(equality):
          <{'config': {'beacon': 'https://some-none-existing-alias...> does not equal None
        ValidationError(dict):
          Unable to validate value of key 'data'
          Context(dict):
            Key 'category' not found in <{'title': '', 'device': '', 'playerId': '', 'deliveryTy...>
  ValidationError(dict):
    Unable to validate value of key 'nonPlayable'
    Context(type):
      Type of None should be dict, but is NoneType

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions