spaam / svtplay-dl

Small command-line program to download videos from some streaming sites.
https://svtplay-dl.se
MIT License
724 stars 122 forks source link

App crashes when trying an upcoming episode #1656

Open tivolimeister opened 5 days ago

tivolimeister commented 5 days ago

svtplay-dl versions:

4.101

Operating system and Python version:

macOS 15.0.1 Python 3.13.0

What is the issue:

svtplay-dl 'https://www.svtplay.se/video/egnwn25/the-pirate-bay/avsnitt-3?info=visa' -v
DEBUG [1731084136.288699] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/utils/getmedia.py/get_media: version: 4.101
DEBUG [1731084136.2911859] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/service/__init__.py/__init__: service: svtplay
DEBUG [1731084136.2912261] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/utils/http.py/request: HTTP getting 'https://www.svtplay.se/video/egnwn25/the-pirate-bay/avsnitt-3?info=visa'
DEBUG [1731084136.296366] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): www.svtplay.se:443
DEBUG [1731084136.4980521] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/urllib3/connectionpool.py/_make_request: https://www.svtplay.se:443 "GET /video/egnwn25/the-pirate-bay/avsnitt-3?info=visa HTTP/11" 200 27204
DEBUG [1731084136.521884] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/utils/http.py/request: HTTP getting 'https://api.svt.se/video/8WAyAwL'
DEBUG [1731084136.52248] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/urllib3/connectionpool.py/_new_conn: Starting new HTTPS connection (1): api.svt.se:443
DEBUG [1731084136.6113431] /opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/urllib3/connectionpool.py/_make_request: https://api.svt.se:443 "GET /video/8WAyAwL HTTP/11" 200 448
Traceback (most recent call last):
  File "/opt/homebrew/bin/svtplay-dl", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/__init__.py", line 69, in main
    get_media(urls[0], config, __version__)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/utils/getmedia.py", line 63, in get_media
    get_one_media(stream)
    ~~~~~~~~~~~~~^^^^^^^^
  File "/opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/utils/getmedia.py", line 112, in get_one_media
    for i in streams:
             ^^^^^^^
  File "/opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/service/svtplay.py", line 100, in get
    yield from videos
  File "/opt/homebrew/Cellar/svtplay-dl/4.101/libexec/lib/python3.13/site-packages/svtplay_dl/service/svtplay.py", line 117, in _get_video
    drm = janson["rights"]["drmCopyProtection"]
          ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
SweDennis commented 5 days ago

Try this: https://www.svtplay.se/klipp/8ZxEykZ/trailer-the-pirate-bay?video=visa which is the actual link to the clip, the "spela trailer" link ... the other one is not a media link ...

Regards, /Dennis