File: test_euronews.py

package info (click to toggle)
streamlink 8.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,608 kB
  • sloc: python: 51,763; sh: 184; makefile: 152
file content (39 lines) | stat: -rw-r--r-- 1,714 bytes parent folder | download | duplicates (4)
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
38
39
from streamlink.plugins.euronews import Euronews
from tests.plugins import PluginCanHandleUrl


class TestPluginCanHandleUrlEuronews(PluginCanHandleUrl):
    __plugin__ = Euronews

    should_match_groups = [
        (("live", "https://euronews.com/live"), {}),
        (("live", "https://www.euronews.com/live"), {"subdomain": "www"}),
        (("live", "https://fr.euronews.com/live"), {"subdomain": "fr"}),
        (("live", "https://de.euronews.com/live"), {"subdomain": "de"}),
        (("live", "https://it.euronews.com/live"), {"subdomain": "it"}),
        (("live", "https://es.euronews.com/live"), {"subdomain": "es"}),
        (("live", "https://pt.euronews.com/live"), {"subdomain": "pt"}),
        (("live", "https://ru.euronews.com/live"), {"subdomain": "ru"}),
        (("live", "https://tr.euronews.com/live"), {"subdomain": "tr"}),
        (("live", "https://gr.euronews.com/live"), {"subdomain": "gr"}),
        (("live", "https://hu.euronews.com/live"), {"subdomain": "hu"}),
        (("live", "https://fa.euronews.com/live"), {"subdomain": "fa"}),
        (("live", "https://arabic.euronews.com/live"), {"subdomain": "arabic"}),
        (
            ("vod", "https://www.euronews.com/video/2025/02/28/latest-news-bulletin-february-28th-midday"),
            {},
        ),
        (
            ("vod", "https://www.euronews.com/my-europe/2025/02/25/whats-at-stake-for-europe-after-the-german-election"),
            {},
        ),
        (
            ("vod", "https://de.euronews.com/my-europe/2025/02/24/frankreichs-prasident-macron-wird-trump-treffen"),
            {},
        ),
    ]

    should_not_match = [
        "https://euronews.com/",
        "https://www.euronews.com/",
    ]