kobayashi

package module
v0.0.0-...-b4a215d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2022 License: GPL-3.0 Imports: 11 Imported by: 1

README

kobayashi

kobayashi is Go library to get streaming sites direct links easy as doing :

package main

import (
	"fmt"
	"log"

	"codeberg.org/omarkhatib/kobayashi"
)

func main () {
  d := kobayashi.NewDecoder()
  directLink , err := d.Decode("https://mixdrop.co/e/zp03jllqawql1q")
  if err != nil {
    // Handle Error...
  }
  fmt.Println(directLink)
  // Result :
  // https://a-delivery15.mxdcontent.net/v/f96b4514c68b0a69ae38c9726488b35e.mp4?s=pWZlKfQUbPmowXdPl_FGAQ&e=1641662900&_t=1641650029

  directLink , err = d.Decode("https://www.fembed.com/api/source/jl4n4fd42rzy3e5")
  if err != nil {
    // Handle Error...
  }
  fmt.Println(directLink)

  // Result :
  // https://fvs.io/redirector?token=bkZHY3IzTVgyMGR2NHRNWGF2NFZ2cHE0YVhIMXJmV3pwTVNKc1d2aVFmdlRGQnhUZUYxMkRRaER0TXdiQTdIdkRMdjFCT2FuejBRd3M4c0d5dUxhVWQzeUw3RnAxdnBzcTNTcWRnMUhBRVpRS21IKzlmVjZDSklCR1IrekZtQ09oMDlscUc4ZS9YcTRGd1VsTUk4cHNLcTEvSm1jTXlEZEZBPT06Zko2allWUUQ5cVlKb01SbThhU3NuUT09yvQ5
}

if we pass unsupported link

directLink , err = d.Decode("https://uptostream.com/tvt5mjn49529")

// Result : host is not supported, yet...

if your host no supported yet , feel free to open an issue and let me know 🧑‍💻

Documentation

Index

Constants

View Source
const (
	GdriveGetDirectLinkPath = "https://www.googleapis.com/drive/v3/files/%s?fields=webContentLink"
)

Variables

View Source
var (
	ErrMallFormated = fmt.Errorf("Malformed p.a.c.k.e.r symtab")
)
View Source
var (
	ErrNotStatusOK = fmt.Errorf("Got a non %d http response", http.StatusOK)
)

Functions

func NewDecoder

func NewDecoder() decoder

Types

type Decoder

type Decoder struct {
}

func (*Decoder) Decode

func (d *Decoder) Decode(urll string) (string, error)

type Unbaser

type Unbaser struct {
	// contains filtered or unexported fields
}

func NewUnbaser

func NewUnbaser(radix int) *Unbaser

func (*Unbaser) Unbase

func (u *Unbaser) Unbase(val string) (int, error)

type Unpacker

type Unpacker struct {
	// contains filtered or unexported fields
}

func NewUnpacker

func NewUnpacker() *Unpacker

func (*Unpacker) Detect

func (u *Unpacker) Detect(body string) bool

func (*Unpacker) LookUp

func (u *Unpacker) LookUp(matches string) string

func (*Unpacker) Unpack

func (u *Unpacker) Unpack(body string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL