V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
faceair
V2EX  ›  分享创造

写了小工具获取英雄联盟比赛 L-Live 官方直播流

  •  1
     
  •   faceair ·
    faceair · 2018-07-01 11:27:00 +08:00 · 3778 次点击
    这是一个创建于 2097 天前的主题,其中的信息可能已经有所发展或是发生改变。
    斗鱼、熊猫、虎牙之类的网站上看比赛 flash 播放器让机器发热非常厉害,HTML5 播放器有时候又会卡顿和音画不同步。

    如果你跟我一样只看英雄联盟的比赛,其实可以直接去 lpl 官网抓流地址,然后就可以使用本地播放器观看了
    http://lpl.qq.com/es/live.shtml

    同时我用 golang 写了一个小工具来自动获取直播的播放流地址,没啥技术含量但挺好用的,欢迎使用
    https://github.com/faceair/llive
    14 条回复    2018-07-03 19:12:30 +08:00
    ifwangs
        1
    ifwangs  
       2018-07-01 16:53:38 +08:00 via Android
    如果有 web 版就方便了,手机用的比较多
    faceair
        2
    faceair  
    OP
       2018-07-01 16:56:45 +08:00
    @ifwangs #1 手机上选择挺多的,各大直播平台的客户端、掌上英雄联盟都行。主要是 mac 上没有原生客户端,web 版的消耗资源又太多。
    a3mao
        3
    a3mao  
       2018-07-01 17:09:52 +08:00
    zsh: command not found: llive
    这是咋回事?
    faceair
        4
    faceair  
    OP
       2018-07-01 17:18:27 +08:00
    @a3mao #3 $GOPATH/bin 没放到 $PATH 里吧,自己搜下资料配下
    a3mao
        5
    a3mao  
       2018-07-01 17:21:26 +08:00
    @faceair

    直接输入 go
    xxx/run % go

    Go is a tool for managing Go source code.

    Usage:

    go command [arguments]

    The commands are:

    build compile packages and dependencies
    clean remove object files and cached files
    doc show documentation for package or symbol
    env print Go environment information
    bug start a bug report
    fix update packages to use new APIs
    fmt gofmt (reformat) package sources
    generate generate Go files by processing source
    get download and install packages and dependencies
    install compile and install packages and dependencies
    list list packages
    run compile and run Go program
    test test packages
    tool run specified go tool
    version print Go version
    vet report likely mistakes in packages

    Use "go help [command]" for more information about a command.

    go 已经可以使用的
    cocang
        6
    cocang  
       2018-07-01 17:33:23 +08:00
    试试 B 站直播 ?
    a3mao
        7
    a3mao  
       2018-07-01 17:38:20 +08:00
    @faceair 看了你的源代码,我可以自己用别的语言搞定了,多谢了。
    leafleave
        8
    leafleave  
       2018-07-01 23:51:38 +08:00 via iPhone
    可以做成一个网页直接放在 github.io 出来,更方便。
    titi14gj
        9
    titi14gj  
       2018-07-02 16:10:53 +08:00 via iPhone
    LazyZhu
        10
    LazyZhu  
       2018-07-03 16:04:00 +08:00
    能否加入 PC 版 WeGame 的各平台直播链接提取?
    faceair
        11
    faceair  
    OP
       2018-07-03 16:48:03 +08:00   ❤️ 1
    @LazyZhu #10 刚补了一个 api,亚运会的比赛能看了
    LazyZhu
        12
    LazyZhu  
       2018-07-03 16:59:16 +08:00
    @faceair
    谢谢, QT 源是 LOL 中文客户端上的吧
    faceair
        13
    faceair  
    OP
       2018-07-03 17:01:33 +08:00
    @LazyZhu #12 网页版也有,之前在前端的代码的注释看上写的是回放接口我就没管...
    faceair
        14
    faceair  
    OP
       2018-07-03 19:12:30 +08:00
    @leafleave #8 理论上可以,但不确定 API 返回的播放地址有没有根据请求 IP 来源分配最近的 CDN 节点之类的,所以还是自己跑个命令比较稳
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3512 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:48 · PVG 18:48 · LAX 03:48 · JFK 06:48
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.