File: test_blasttv.py

package info (click to toggle)
streamlink 8.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,564 kB
  • sloc: python: 51,188; sh: 184; makefile: 152
file content (37 lines) | stat: -rw-r--r-- 1,393 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from streamlink.plugins.blasttv import BlastTv
from tests.plugins import PluginCanHandleUrl


class TestPluginCanHandleUrlBlastTv(PluginCanHandleUrl):
    __plugin__ = BlastTv

    should_match_groups = [
        # live
        (("live", "https://blast.tv"), {}),
        (("live", "https://blast.tv/"), {}),
        (("live", "https://blast.tv/live"), {}),
        (("live", "https://blast.tv/live/"), {}),
        (("live", "https://blast.tv/live/a"), {"channel": "a"}),
        (("live", "https://blast.tv/live/co-stream"), {"channel": "co-stream"}),
        (("live", "https://blast.tv/live/americas1"), {"channel": "americas1"}),
        # external streams (at the time of testing)
        (("live", "https://blast.tv/live/f"), {"channel": "f"}),
        # VODs
        (
            ("vod", "https://blast.tv/cs/tournaments/rivals-2025-season-1/match/bfaaa42e/falcons-vitality"),
            {"game": "cs", "shortid": "bfaaa42e"},
        ),
        (
            ("vod", "https://blast.tv/cs/tournaments/open-2025-season-1/match/24ff9d6c/vitality-mouz"),
            {"game": "cs", "shortid": "24ff9d6c"},
        ),
        # external VODs
        (
            ("vod", "https://blast.tv/dota/tournaments/blast-slam-iii/match/acabb915/falcons-tundra"),
            {"game": "dota", "shortid": "acabb915"},
        ),
    ]

    should_not_match = [
        "https://blast.tv/a",
    ]