https://github.com/deflix-tv/imdb2torrent
Go library for finding torrents for movies and TV shows by IMDb ID on YTS, The Pirate Bay, 1337x, RARBG and ibit
https://github.com/deflix-tv/imdb2torrent
deflix go golang imdb magnet magnet-link movies torrent torrents tv-shows
Last synced: 4 months ago
JSON representation
Go library for finding torrents for movies and TV shows by IMDb ID on YTS, The Pirate Bay, 1337x, RARBG and ibit
- Host: GitHub
- URL: https://github.com/deflix-tv/imdb2torrent
- Owner: Deflix-tv
- License: agpl-3.0
- Created: 2021-01-05T20:54:07.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T14:38:39.000Z (over 4 years ago)
- Last Synced: 2025-04-30T18:11:50.791Z (6 months ago)
- Topics: deflix, go, golang, imdb, magnet, magnet-link, movies, torrent, torrents, tv-shows
- Language: Go
- Homepage: https://www.deflix.tv
- Size: 85.9 KB
- Stars: 16
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# imdb2torrent
Go library for finding torrents for movies and TV shows by IMDb ID on YTS, The Pirate Bay, 1337x, RARBG and ibit
## Usage
You can either use a site-specific client:
```go
package main
import (
"context"
"fmt"
"github.com/deflix-tv/imdb2torrent"
"go.uber.org/zap"
)
func main() {
// Create new client
yts := imdb2torrent.NewYTSclient(imdb2torrent.DefaultYTSclientOpts, imdb2torrent.NewInMemoryCache(), zap.NewNop(), false)
// Fetch torrents for a movie
// Here we use the IMDb ID of "Night of the Living Dead" from 1968, which is in the public domain
torrents, err := yts.FindMovie(context.Background(), "tt0063350")
if err != nil {
panic(err)
}
// Iterate through results and print their magnet URLs
for _, torrent := range torrents {
fmt.Printf("Found torrent: %v\n", torrent.MagnetURL)
}
}
```
Or use the `imdb2torrent.Client`, which uses multiple site-specific clients _concurrently_.
For more detailed examples see [examples](examples).