videoframes.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:desktop-stream-viewer 作者: AbiosGaming 项目源码 文件源码
def open_stream_in_browser(self, event):
        stream_url = urlparse(self.stream.url)

        netloc = stream_url.netloc
        path = stream_url.path

        if "twitch" in netloc:
            path = stream_url.path + "/chat"

        if "youtube" in netloc:
            path = path.replace("watch", "live_chat")

        correct_url = (stream_url.scheme, netloc, path, stream_url.params, stream_url.query, stream_url.fragment)

        url = urlunparse(correct_url)

        os = platform.system()
        if os == OS.WINDOWS:
            os2.startfile(url)
        else:
            webbrowser.open(url)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号