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 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
from streamlink.plugins.artetv import ArteTV
from tests.plugins import PluginCanHandleUrl
class TestPluginCanHandleUrlArteTV(PluginCanHandleUrl):
__plugin__ = ArteTV
should_match_groups = [
# live
(
("live", "https://www.arte.tv/fr/direct"),
{"language": "fr"},
),
(
("live", "https://www.arte.tv/fr/direct/"),
{"language": "fr"},
),
(
("live", "https://www.arte.tv/de/live"),
{"language": "de"},
),
(
("live", "https://www.arte.tv/de/live/"),
{"language": "de"},
),
# vod
(
("vod", "https://www.arte.tv/de/videos/097372-001-A/mysterium-satoshi-bitcoin-wie-alles-begann-1-6/"),
{"language": "de", "video_id": "097372-001-A"},
),
(
("vod", "https://www.arte.tv/en/videos/097372-001-A/the-satoshi-mystery-the-story-of-bitcoin/"),
{"language": "en", "video_id": "097372-001-A"},
),
# old vod URLs with redirects
(
("vod", "https://www.arte.tv/guide/de/097372-001-A/mysterium-satoshi-bitcoin-wie-alles-begann-1-6/"),
{"language": "de", "video_id": "097372-001-A"},
),
(
("vod", "https://www.arte.tv/guide/en/097372-001-A/the-satoshi-mystery-the-story-of-bitcoin/"),
{"language": "en", "video_id": "097372-001-A"},
),
]
should_not_match = [
"https://www.arte.tv/guide/de/live/",
"https://www.arte.tv/guide/fr/plus7/",
"https://www.arte.tv/guide/de/plus7/",
# shouldn't match - playlists without video ids in url
"https://www.arte.tv/en/videos/RC-014457/the-power-of-forests/",
"https://www.arte.tv/en/videos/RC-013118/street-art/",
]
|