Thanks to visit codestin.com
Credit goes to github.com

Skip to content

plugins.twitch: add access token to clips#3762

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:plugins/twitch/clips-access-token
May 31, 2021
Merged

plugins.twitch: add access token to clips#3762
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:plugins/twitch/clips-access-token

Conversation

@bastimeyer

@bastimeyer bastimeyer commented May 30, 2021

Copy link
Copy Markdown
Member

Resolves #3761

Clips require three different "persisted" GQL queries now (I couldn't make the previously used custom query work), one which fetches the access token and video qualities, one which fetches the broadcaster and category names, and one which fetches the clip title. There's another query called "ClipsSocialShare" which combines the second and third queries, but the result only includes the broadcaster's "login" property, and not the "displayName" property, which is not necessarily the same.

I am also not sure if there are clips where the validation could break, as it expects all data to be available, whereas the previous validation schema made the metadata optional.

$ streamlink -l debug --title '{author} - {category} - {title}' https://clips.twitch.tv/GrossRamshacklePheasantPipeHype-vb-LdFjwD-kLo87L best
[cli][debug] OS:         Linux-5.12.7-1-git-x86_64-with-glibc2.33
[cli][debug] Python:     3.9.5
[cli][debug] Streamlink: 2.1.2+11.gb7a05ed
[cli][debug] Requests(2.25.0), Socks(1.7.1), Websocket(0.58.0)
[cli][debug] Arguments:
[cli][debug]  url=https://clips.twitch.tv/GrossRamshacklePheasantPipeHype-vb-LdFjwD-kLo87L
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][debug]  --player-args=--cache=yes --demuxer-max-bytes=750k --demuxer-max-back-bytes=2G
[cli][debug]  --title={author} - {category} - {title}
[cli][debug]  --hls-live-edge=2
[cli][debug]  --hls-segment-threads=2
[cli][debug]  --twitch-disable-hosting=True
[cli][debug]  --twitch-disable-ads=True
[cli][debug]  --twitch-disable-reruns=True
[cli][debug]  --twitch-low-latency=True
[cli][info] Found matching plugin twitch for URL https://clips.twitch.tv/GrossRamshacklePheasantPipeHype-vb-LdFjwD-kLo87L
[cli][info] Available streams: 360p30 (worst), 480p30, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (http)
[cli][debug] Pre-buffering 8192 bytes
[cli][info] Starting player: mpv
[cli.output][debug] Opening subprocess: mpv "--force-media-title=ludwig - Just Chatting - xQc admits to being a Tier 3 Pokimane sub." --cache=yes --demuxer-max-bytes=750k --demuxer-max-back-bytes=2G -
[cli][debug] Writing stream to output
[cli][info] Player closed
[cli][info] Stream ended
[cli][info] Closing currently open stream...

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label May 30, 2021
@bastimeyer bastimeyer force-pushed the plugins/twitch/clips-access-token branch from c2c359e to b7a05ed Compare May 30, 2021 20:55

@gravyboat gravyboat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Bummer about not being able to use a single query but that is Twitch's fault, not ours.

@gravyboat gravyboat merged commit ac0e7d4 into streamlink:master May 31, 2021
@bastimeyer bastimeyer deleted the plugins/twitch/clips-access-token branch May 31, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin issue A Plugin does not work correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugins.twitch: clips 404 - require access token

2 participants