internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: streamlink/streamlink

Issue:
Shell tab completion support
## Feature Request

- [x] This is a feature request and I have read the contribution guidelines.


### Description

Streamlink should provide shell completions for all of its parameters. This could either be static and simple, or a bit more sophisticated and dynamic, depending on the allowed parameter values. Completion data for multiple shells, like fish for example, would also be nice.

I've checked a couple of solutions that work in conjunction with `argparse`, so that shell scripts don't have to be written manually and maintained next to the regular parameter definitions. This can be done with [`argcomplete`](https://github.com/kislyuk/argcomplete) for example, but it needs to run before streamlink-cli's own code gets executed and also needs to be added as a dependency (obviously), and I'm not sure if that's desired.

If there's a way to generate shell completion scripts from argparse, then this would be the best solution.


Discussion:
I've only ever used argcomplete for this. I don't think argparse has anything built in unless it has flown under the radar for quite some time. I'm against adding additional dependencies (such as the js parser as discussed before) since the value added is really low. This actually has some merit to improve functionality so if it doesn't add too much on to the start time of Streamlink or bloat unnecessarily I'd be okay with either argcomplete or something else.
I wonder if it's possible to make it part of the build and include the generated files, without having to include the dependency in the distribution packages. 

Everyone hating on the js parser, even though it is pure python and has no transient dependencies, and is useful... 
@beardypig My only hate comes from the fact it is unmaintained software. If it was actively being maintained I would have no issue.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -65,7 +65,16 @@ def is_wheel_for_windows():
     entry_points["gui_scripts"] = ["streamlinkw=streamlink_cli.main:main"]
 
 
+# optional data files
 additional_files = [
+    # shell completions
+    #  requires pre-built completion files via shtab (dev-requirements.txt)
+    #  `./script/build-shell-completions.sh`
+    ("share/bash-completion/completions", ["build/shtab/bash/streamlink"]),
+    ("share/zsh/site-functions", ["build/shtab/zsh/_streamlink"]),
+    # man page
+    #  requires pre-built man page file via sphinx (docs-requirements.txt)
+    #  `make --directory=docs clean man`
     ("share/man/man1", ["docs/_build/man/streamlink.1"])
 ]
 


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.foxtr: No playable streams found
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest build from the master branch

### Description

Plugin does not work

### Debug log

```text
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.8.10
[cli][debug] Streamlink: 3.0.1+61.gae63436
[cli][debug] Requests(2.26.0), Socks(1.7.1), Websocket(1.2.1)
[cli][debug] Arguments:
[cli][debug]  url=https://www.fox.com.tr/canli-yayin
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin foxtr for URL https://www.fox.com.tr/canli-yayin
error: No playable streams found on this URL: https://www.fox.com.tr/canli-yayin
```



Discussion:
> Latest build from the master branch

ae63436 is not part of streamlink/streamlink@master
This is from your own fork which is not supported here...

> error: No playable streams found on this URL: https://www.fox.com.tr/canli-yayin

The site has made some changes. Extracting the HLS URLs should still be easy and is just a simple regex change in the plugin:
https://github.com/streamlink/streamlink/blob/8eb0c74aba45f09c6a8da4bf395e4ac50caebd57/src/streamlink/plugins/foxtr.py#L11

Resolving patch:
diff --git a/src/streamlink/plugins/foxtr.py b/src/streamlink/plugins/foxtr.py
--- a/src/streamlink/plugins/foxtr.py
+++ b/src/streamlink/plugins/foxtr.py
@@ -1,6 +1,7 @@
 import re
 
 from streamlink.plugin import Plugin, pluginmatcher
+from streamlink.plugin.api import validate
 from streamlink.stream.hls import HLSStream
 
 
@@ -8,13 +9,12 @@
     r"https?://(?:www\.)?fox(?:play)?\.com\.tr/"
 ))
 class FoxTR(Plugin):
-    playervars_re = re.compile(r"source\s*:\s*\[\s*\{\s*videoSrc\s*:\s*(?:mobilecheck\(\)\s*\?\s*)?'([^']+)'")
-
     def _get_streams(self):
-        res = self.session.http.get(self.url)
-        match = self.playervars_re.search(res.text)
-        if match:
-            stream_url = match.group(1)
+        re_streams = re.compile(r"""(['"])(?P<url>https://\S+/foxtv\.m3u8\S+)\1""")
+        res = self.session.http.get(self.url, schema=validate.Schema(
+            validate.transform(re_streams.findall)
+        ))
+        for _, stream_url in res:
             return HLSStream.parse_variant_playlist(self.session, stream_url)
 
 


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.twitch: does not work if the link has certain query parameters
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest master https://github.com/streamlink/streamlink/commit/f9e7239f93b9865c60a0c32c69cd41b16837318e

### Description

Twitch links with query parameters like "?tt_content=channel_name&tt_medium=embed" etc. do not work when passing to CLI.

### Debug log

```text
D:\>streamlink "https://www.twitch.tv/averagejonas?tt_content=channel_name&tt_medium=embed" --loglevel debug
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.9.1
[cli][debug] Streamlink: 3.0.3+31.gf9e7239
[cli][debug] Requests(2.27.1), Socks(1.7.1), Websocket(1.2.3)
[cli][debug] Arguments:
[cli][debug]  url=https://www.twitch.tv/averagejonas?tt_content=channel_name&tt_medium=embed
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin twitch for URL https://www.twitch.tv/averagejonas?tt_content=channel_name&tt_medium=embed
[plugins.twitch][debug] Getting live HLS streams for averagejonas?tt_content=channel_name&tt_medium=embed
error: No playable streams found on this URL: https://www.twitch.tv/averagejonas?tt_content=channel_name&tt_medium=embed
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/twitch.py b/src/streamlink/plugins/twitch.py
--- a/src/streamlink/plugins/twitch.py
+++ b/src/streamlink/plugins/twitch.py
@@ -462,11 +462,11 @@ def hosted_channel(self, channel):
     (?:
         videos/(?P<videos_id>\d+)
         |
-        (?P<channel>[^/]+)
+        (?P<channel>[^/?]+)
         (?:
             /video/(?P<video_id>\d+)
             |
-            /clip/(?P<clip_name>[\w-]+)
+            /clip/(?P<clip_name>[^/?]+)
         )?
     )
 """, re.VERBOSE))


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.pluzz : Allow Beijing 2022 streams
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest build from the master branch

### Description

Plugin is unable to retrieve streams from webpage

steps : 

- get the live link : https://www.france.tv/beijing-h24/direct.html
- launch `streamlink "https://www.france.tv/beijing-h24/direct.html"`

### Debug log

```text
[cli][debug] OS:         Linux-5.17.0-051700rc2-lowlatency-x86_64-with-glibc2.34
[cli][debug] Python:     3.10.2
[cli][debug] Streamlink: 3.1.1
[cli][debug] Requests(2.27.1), Socks(1.7.1), Websocket(1.2.1)
[cli][debug] Arguments:
[cli][debug]  url=https://www.france.tv/beijing-h24/direct.html
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin pluzz for URL https://www.france.tv/beijing-h24/direct.html
[plugins.pluzz][debug] Country: FR
[plugins.pluzz][debug] Video ID: 35cdf7ed-f565-40b6-b2a7-256e1ad17965
error: Unable to validate response text: Unable to validate key 'video': Unable to validate key 'workflow': 'dai' does not equal 'token-akamai'
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/pluzz.py b/src/streamlink/plugins/pluzz.py
--- a/src/streamlink/plugins/pluzz.py
+++ b/src/streamlink/plugins/pluzz.py
@@ -98,7 +98,7 @@ def _get_streams(self):
             validate.parse_json(),
             {
                 "video": {
-                    "workflow": "token-akamai",
+                    "workflow": validate.any("token-akamai", "dai"),
                     "format": validate.any("dash", "hls"),
                     "token": validate.url(),
                     "url": validate.url()


Test patch:
Repository: streamlink/streamlink

Issue:
Python 3.6 has reached its EOL
Python 3.6 has had its official EOL on 2021-12-23
https://endoflife.date/python
https://www.python.org/dev/peps/pep-0494/#lifespan

Dropping Python 3.6 and setting the minimum version requirement to 3.7 enables the following main features:

- forward references for type hints (with `__future__` import)
- contextvars and asyncio improvements
- dataclasses as a mutable and subclassable alternative to named tuples
- `collections.OrderedDict` has become obsolete, as ordered `dict`s are now standardized (not an implementation detail anymore like in 3.6)

https://docs.python.org/3/whatsnew/3.7.html

Dropping 3.6 doesn't have to be done right now, but it's something we should keep in mind for one of the next releases.


Discussion:
Btw, some of Streamlink's dependencies have already dropped py36 in their recent releases. If there are any dependency issues, we'll have to drop py36 here too before we can upgrade.

The removal is not blocked by anything other than avoiding an unnecessary major version bump that could otherwise be combined with other breaking changes.
I'm fine with dropping this support whenever and doing another release.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,7 @@ def format_msg(text, *args, **kwargs):
 
 
 CURRENT_PYTHON = version_info[:2]
-REQUIRED_PYTHON = (3, 6)
+REQUIRED_PYTHON = (3, 7)
 
 # This check and everything above must remain compatible with older Python versions
 if CURRENT_PYTHON < REQUIRED_PYTHON:


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.vk: Could not parse API response
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest stable release

### Description

Cannot open streams from vk.com.

### Debug log

```text
[cli][debug] OS:         Linux-5.18.5-zen1-1-zen-x86_64-with-glibc2.35
[cli][debug] Python:     3.10.5
[cli][debug] Streamlink: 4.1.0
[cli][debug] Requests(2.27.1), Socks(1.7.1), Websocket(1.3.2)
[cli][debug] Arguments:
[cli][debug]  url=https://vk.com/video-211154316_456239169
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][debug]  --default-stream=['best']
[cli][debug]  --twitch-disable-ads=True
[cli][info] Found matching plugin vk for URL https://vk.com/video-211154316_456239169
[plugins.vk][debug] video ID: -211154316_456239169
[plugins.vk][error] Could not parse API response
error: No playable streams found on this URL: https://vk.com/video-211154316_456239169
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/vk.py b/src/streamlink/plugins/vk.py
--- a/src/streamlink/plugins/vk.py
+++ b/src/streamlink/plugins/vk.py
@@ -1,5 +1,5 @@
 """
-$description Russian live streaming and video hosting social platform.
+$description Russian live-streaming and video hosting social platform.
 $url vk.com
 $type live, vod
 """
@@ -67,10 +67,11 @@ def _get_streams(self):
             data = self.session.http.post(
                 self.API_URL,
                 params={
-                    "act": "show_inline",
+                    "act": "show",
                     "al": "1",
                     "video": video_id,
                 },
+                headers={"Referer": self.url},
                 schema=validate.Schema(
                     validate.transform(lambda text: re.sub(r"^\s*<!--\s*", "", text)),
                     validate.parse_json(),


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.huya: As of today, Huya plugin has been broken
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest stable release

### Description

When I try to open any public Huya stream I get an error message. Assuming Huya has changed how live IDs are handled and switched to strings.

### Debug log

```text
hina@Hinas-MacBook-Pro ~ % streamlink https://www.huya.com/660108 best --loglevel debug
[cli][debug] OS:         macOS 12.5
[cli][debug] Python:     3.10.6
[cli][debug] Streamlink: 4.3.0
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.1
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.15.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.28.1
[cli][debug]  websocket-client: 1.3.3
[cli][debug] Arguments:
[cli][debug]  url=https://www.huya.com/660108
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin huya for URL https://www.huya.com/660108
error: Unable to validate response text: ValidationError(NoneOrAllSchema):
  ValidationError(dict):
    Unable to validate value of key 'data'
    Context(AnySchema):
      ValidationError(dict):
        Unable to validate value of key 'gameLiveInfo'
        Context(dict):
          Unable to validate value of key 'liveId'
          Context(type):
            Type of '7134607205476108031' should be int, but is str
hina@Hinas-MacBook-Pro ~ %
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/huya.py b/src/streamlink/plugins/huya.py
--- a/src/streamlink/plugins/huya.py
+++ b/src/streamlink/plugins/huya.py
@@ -54,7 +54,7 @@ def _get_streams(self):
                 {
                     "data": [{
                         "gameLiveInfo": {
-                            "liveId": int,
+                            "liveId": str,
                             "nick": str,
                             "roomName": str,
                         },


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.btv: No playable streams found
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest stable release

### Description

The plugin is not functional. I am attaching a log.

### Debug log

```text
streamlink --loglevel debug "https://btvplus.bg/live/" best
[cli][debug] OS:         Linux-5.15.0-50-generic-x86_64-with-glibc2.29
[cli][debug] Python:     3.8.10
[cli][debug] Streamlink: 5.0.1
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.0
[cli][debug]  lxml: 4.6.4
[cli][debug]  pycountry: 19.8.18
[cli][debug]  pycryptodome: 3.9.9
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.26.0
[cli][debug]  websocket-client: 1.2.1
[cli][debug] Arguments:
[cli][debug]  url=https://btvplus.bg/live/
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][info] Found matching plugin btv for URL https://btvplus.bg/live/
[utils.l10n][debug] Language code: bg_BG
error: No playable streams found on this URL: https://btvplus.bg/live/
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/btv.py b/src/streamlink/plugins/btv.py
--- a/src/streamlink/plugins/btv.py
+++ b/src/streamlink/plugins/btv.py
@@ -44,14 +44,11 @@ def _get_streams(self):
                         validate.parse_json(),
                         {
                             "status": "ok",
-                            "config": str,
+                            "info": {
+                                "file": validate.url(path=validate.endswith(".m3u8")),
+                            },
                         },
-                        validate.get("config"),
-                        re.compile(r"src: \"(http.*?)\""),
-                        validate.none_or_all(
-                            validate.get(1),
-                            validate.url(),
-                        ),
+                        validate.get(("info", "file")),
                     ),
                 ),
             ),
@@ -63,7 +60,7 @@ def _get_streams(self):
             log.error("The content is not available in your region")
             return
 
-        return HLSStream.parse_variant_playlist(self.session, stream_url)
+        return {"live": HLSStream(self.session, stream_url)}
 
 
 __plugin__ = BTV


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.tv8: Doesn't work
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest build from the master branch

### Description

Getting 403 error

### Debug log

```text
[cli][debug] OS:         Windows 7
[cli][debug] Python:     3.8.14
[cli][debug] Streamlink: 5.0.1+17.gbfcd372
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.1
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.15.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.28.1
[cli][debug]  websocket-client: 1.4.1
[cli][debug] Arguments:
[cli][debug]  url=https://www.tv8.com.tr/canli-yayin
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player="mpv.exe"
[cli][debug]  --ffmpeg-ffmpeg=ffmpeg.exe
[cli][info] Found matching plugin tv8 for URL https://www.tv8.com.tr/canli-yayin
[utils.l10n][debug] Language code: en_US
error: Unable to open URL: https://tv8-tb-live.ercdn.net/tv8-geo/playlist.m3u8?st=xxxx&e=xxxx (403 Client Error: Forbidden for url: https://tv8-tb-live.ercdn.net/tv8-geo/playlist.m3u8?st=xxxx&e=xxxx)
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/tv8.py b/src/streamlink/plugins/tv8.py
--- a/src/streamlink/plugins/tv8.py
+++ b/src/streamlink/plugins/tv8.py
@@ -18,11 +18,9 @@
     r"https?://www\.tv8\.com\.tr/canli-yayin"
 ))
 class TV8(Plugin):
-    title = "TV8"
-
     def _get_streams(self):
         hls_url = self.session.http.get(self.url, schema=validate.Schema(
-            re.compile(r"""file\s*:\s*(?P<q>["'])(?P<hls_url>https?://.*?\.m3u8.*?)(?P=q)"""),
+            re.compile(r"""var\s+videoUrl\s*=\s*(?P<q>["'])(?P<hls_url>https?://.*?\.m3u8.*?)(?P=q)"""),
             validate.any(None, validate.get("hls_url")),
         ))
         if hls_url is not None:


Test patch:
Repository: streamlink/streamlink

Issue:
plugins.dailymotion: Stopped working, ValidationError
### Checklist

- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recently closed plugin issues](https://github.com/streamlink/streamlink/issues?q=is%3Aissue+label%3A%22plugin+issue%22)
- [X] [I have checked the commit log of the master branch](https://github.com/streamlink/streamlink/commits/master)

### Streamlink version

Latest build from the master branch

### Description

Dailymotion plugin stopped working some days ago.
Now unable to open any video or live from the site.

### Debug log

```text
streamlink -l debug https://www.dailymotion.com/video/x2lefik best
[cli][debug] OS:         Windows 10
[cli][debug] Python:     3.10.8
[cli][debug] Streamlink: 5.0.1+21.g2aecef7
[cli][debug] Dependencies:
[cli][debug]  isodate: 0.6.1
[cli][debug]  lxml: 4.9.1
[cli][debug]  pycountry: 22.3.5
[cli][debug]  pycryptodome: 3.15.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.28.1
[cli][debug]  websocket-client: 1.4.1
[cli][debug] Arguments:
[cli][debug]  url=https://www.dailymotion.com/video/x2lefik
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --ffmpeg-ffmpeg=ffmpeg.exe
[cli][info] Found matching plugin dailymotion for URL https://www.dailymotion.com/video/x2lefik
[plugins.dailymotion][debug] Found media ID: x2lefik
error: Unable to validate response text: ValidationError(AnySchema):
  ValidationError(dict):
    Key 'error' not found in <{'url': 'https://www.dailymotion.com/video/x2lefik', 'p...>
  ValidationError(dict):
    Key 'error' not found in <{'url': 'https://www.dailymotion.com/video/x2lefik', 'p...>
  ValidationError(dict):
    Key 'owner.username' not found in <{'url': 'https://www.dailymotion.com/video/x2lefik', 'p...>
```



Discussion:

Resolving patch:
diff --git a/src/streamlink/plugins/dailymotion.py b/src/streamlink/plugins/dailymotion.py
--- a/src/streamlink/plugins/dailymotion.py
+++ b/src/streamlink/plugins/dailymotion.py
@@ -45,7 +45,9 @@ def _get_streams_from_media(self, media_id):
                         "error": {"title": str},
                     },
                     {
-                        "owner.username": str,
+                        "owner": {
+                            "username": str,
+                        },
                         "title": str,
                         "qualities": {
                             str: [{
@@ -67,7 +69,7 @@ def _get_streams_from_media(self, media_id):
             return
 
         self.id = media_id
-        self.author = media["owner.username"]
+        self.author = media["owner"]["username"]
         self.title = media["title"]
 
         for quality, streams in media["qualities"].items():


Test patch: