streamlink / streamlink
Showing 1 of 1 files from the diff.

@@ -46,8 +46,8 @@
Loading
46 46
                ),
47 47
            ),
48 48
        )
49 -
50 49
        if not js_url:
50 +
            log.error("Could not find JS URL")
51 51
            return
52 52
53 53
        log.debug(f"JS URL={js_url}")
@@ -55,9 +55,9 @@
Loading
55 55
        data = self.session.http.get(
56 56
            js_url,
57 57
            schema=validate.Schema(
58 -
                re.compile(r"i\s*=\s*\[(.*)]\.join"),
58 +
                re.compile(r"var \w+\s*=\s*\[(?P<data>.+)]\.join\([\"']{2}\)"),
59 59
                validate.none_or_all(
60 -
                    validate.get(1),
60 +
                    validate.get("data"),
61 61
                    validate.transform(lambda s: re.sub(r"['\", ]", "", s)),
62 62
                    validate.transform(lambda s: base64.b64decode(s)),
63 63
                    validate.parse_json(),
@@ -73,13 +73,16 @@
Loading
73 73
                ),
74 74
            ),
75 75
        )
76 +
        if not data:
77 +
            log.error("Could not find base64 encoded JSON data")
78 +
            return
76 79
77 80
        hls_url = data["streamUrl"]
78 81
79 82
        if data["daiEnabled"]:
80 83
            log.debug("daiEnabled=true")
81 84
            hls_url = self.session.http.post(
82 -
                self.DAI_URL.format(data['daiAssetKey']),
85 +
                self.DAI_URL.format(data["daiAssetKey"]),
83 86
                data={"api-key": data["daiApiKey"]},
84 87
                schema=validate.Schema(
85 88
                    validate.parse_json(),
Files Coverage
src 60.22%
tests 100.00%
Project Totals (414 files) 73.77%
os:ubuntu-20.04 py:3.10
Build #3162041235 -
os:ubuntu-20.04 py:3.7
Build #3162041235 -
os:ubuntu-20.04 py:3.8
Build #3162041235 -
os:ubuntu-20.04 py:3.9
Build #3162041235 -
os:windows-latest py:3.10
Build #3162041235 -
os:ubuntu-20.04 py:3.11-dev
Build #3162041235 -
os:windows-latest py:3.7
Build #3162041235 -
os:windows-latest py:3.9
Build #3162041235 -
os:windows-latest py:3.11-dev
Build #3162041235 -
os:windows-latest py:3.8
Build #3162041235 -

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading