otts

package
v1.0.3 Latest Latest
Warning

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

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

README

Description of the 1337x scraping library

otts searches torrents on 1337x.to

See here the Go documentation of this library.

The Lookup function searches 1337x.to and returns a clean list of torrents. For each torrent the following info is retrieved:

  • name
  • description page
  • size
  • upload date
  • number of seeders
  • number of leechers

The ExtractMag function opens a torrent description page and retrieves the torrent magnet link.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractMag

func ExtractMag(descURL string, timeout time.Duration) (string, error)

ExtractMag opens the torrent description page and extracts the magnet link. A user timeout is set.

Types

type Torrent

type Torrent struct {
	DescURL string
	Name    string
	Size    string
	UplDate string
	// Seeders and Leechers are converted to -1 if cannot be converted to integers
	Seeders  int
	Leechers int
}

Torrent contains meta information about the torrent

func Lookup

func Lookup(in string, timeout time.Duration) ([]Torrent, error)

Lookup takes a user search as a parameter, launches the http request with a custom timeout, and returns clean torrent information fetched from 1337x.to

Jump to

Keyboard shortcuts

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