Skip to content

plugins.dlive: fix live streams #5622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Conversation

allanf181
Copy link
Contributor

Closes #5611

@allanf181 allanf181 marked this pull request as ready for review October 18, 2023 05:39
@bastimeyer bastimeyer changed the title Fix dlive plugins.dlive: fix live streams Oct 18, 2023
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

Please reformat for better readability and extensibility.

After that's merged, I will fix the VODs which are currently broken, too. This will require making another GQL API call.

@@ -86,7 +86,7 @@ def _get_streams_live(self, channel):
self.author = channel
self.title = livestream["title"]

return HLSStream.parse_variant_playlist(self.session, self.URL_LIVE.format(username=username))
return HLSStream.parse_variant_playlist(self.session, self.URL_LIVE.format(username=username), headers={"Referer": "https://dlive.tv/"})
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return HLSStream.parse_variant_playlist(self.session, self.URL_LIVE.format(username=username), headers={"Referer": "https://dlive.tv/"})
return HLSStream.parse_variant_playlist(
self.session,
self.URL_LIVE.format(username=username),
headers={
"Referer": "https://dlive.tv/",
},
)

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Oct 18, 2023
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

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

Going to merge this now and fix the formatting myself afterwards, so there's no need to update this PR here. The changes actually should've triggered a linting error due to the max line length (hence my request to reformat), but for some reason there's a linting config issue after the recent changes which needs to get fixed.

As said, the VODs also require additional fixing, which I will do in one go afterwards.

@bastimeyer bastimeyer merged commit 244acaf into streamlink:master Oct 18, 2023
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.dlive: Failed to fetch segment | 403 Client Error
2 participants