Code Monkey home page Code Monkey logo

tv's Introduction

OliveTV

GoDoc GitHub Workflow Status Sourcegraph

OliveTV is a CLI utility which gets stream url along with other streamer details.

Installation

  • build from source

    go install github.com/go-olive/tv/cmd/olivetv@latest

  • download from releases

Quickstart

After installing, simply use:

olivetv -u https://www.huya.com/518512

or

olivetv -sid huya -rid 518512

Some platforms might need a cookie, use -c to set one.

eg. olivetv -u https://live.douyin.com/xxx -c cookie

site cookie example
douyin "__ac_nonce=06245c89100e7ab2dd536; __ac_signature=_02B4Z6wo00f01LjBMSAAAIDBwA.aJ.c4z1C44TWAAEx696;"
kuaishou "did=web_d079abeeeba77349c6eb5724363b8958"

API Guide

This API is what powers the cli but is also available to developers that wish to make use of the data OliveTV can retrieve in their own application.

Extracting streams

package main

import (
	"github.com/go-olive/tv"
)

func main() {
	t, err := tv.New("huya", "518512")
	if err != nil {
		return
	}
	if err := t.Snap(); err != nil {
		return
	}
	if url, liveOn := t.StreamUrl(); liveOn {
		println("stream url: ", url)
	}
}

Contributing

All contributions are welcome. Feel free to open a new thread on the issue tracker or submit a new pull request.

For developer, check out template file if you want to add a new site.

Credits

This project is inspired by real-url and streamlink.

tv's People

Contributors

luxcgo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tv's Issues

抖音挂了

在直播的房间无法得到url了。
改了下代码,打印response出来是Bad Gateway。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.