npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lucasmod/modulo-torrent

v1.8.0

Published

Módulo para scraping de torrents, desenvolvido por @lucas_mod_domina.

Downloads

16

Readme

-----------------------------------------------------

Módulo Torrent 🚀

Banner Torrent


npm version Build Status License: ISC



Módulo Torrent é uma biblioteca Node.js que facilita o acesso a informações de torrents do site Limontorrents, permitindo a extração de dados como destaques, os últimos adicionados e navegação paginada. Explore a documentação abaixo e descubra como integrar este módulo de forma simples e intuitiva! 😃


📌 Recursos

Funcionalidades Incríveis:

  • getDestaques: Recupera os torrents em destaque.
  • getUltimosAdicionados: Lista os torrents mais recentes adicionados.
  • getPagination: Permite navegar pelas páginas dos resultados.
  • search: Realiza buscas por filmes ou séries.
  • getMovieDetails: Obtém detalhes de um filme ou série.
  • downloadTorrent: Faz o download de torrents com feedback de progresso.
  • getTorrentStream: Inicia o streaming de um torrent com progresso dinâmico.

⚙️ Instalação


Para instalar o módulo, utilize o npm:

npm install @lucasmod/modulo-torrent

🚀 Modo de Uso


Exemplo Básico

const torrent = require('@lucasmod/modulo-torrent')

// Usando getDestaques
torrent.getDestaques((result) => {
console.log(JSON.stringify(result, null, 2))
})

// Usando getUltimosAdicionados
torrent.getUltimosAdicionados((result) => {
console.log(JSON.stringify(result, null, 2))
})

// Usando getPagination para a página 2
torrent.getPagination((result) => {
console.log(JSON.stringify(result, null, 2))
}, 2)

Exemplos Avançados

const torrent = require('@lucasmod/modulo-torrent')

// Usando getDestaques
torrent.getDestaques((result) => {
if (result.status) {
console.log('Destaques:', JSON.stringify(result, null, 2))
} else {
console.error('Erro ao buscar destaques:', result.mensagem)
}
})

// Usando getUltimosAdicionados
torrent.getUltimosAdicionados((result) => {
if (result.status) {
console.log('Últimos Adicionados:', JSON.stringify(result, null, 2))
} else {
console.error('Erro ao buscar últimos adicionados:', result.mensagem)
}
})

// Usando getPagination para a página 2
torrent.getPagination((result) => {
if (result.status) {
console.log('Página 2:', JSON.stringify(result, null, 2))
} else {
console.error('Erro ao buscar a página 2:', result.mensagem)
}
}, 2)

// Usando search para buscar filmes ou séries
const searchQuery = 'avengers'

torrent.search(searchQuery)
.then(result => {
if (result.status) {
console.log(`Resultados para "${searchQuery}":`, JSON.stringify(result, null, 2))
} else {
console.error(`Erro ao buscar por "${searchQuery}":`, result.mensagem)
}
})
.catch(error => {
console.error('Erro ao realizar a busca:', error.message)
})

// Usando getMovieDetails para obter detalhes de um filme ou série
const movieUrl = 'https://limontorrents.com/os-vingadores-the-avengers/'

torrent.getMovieDetails(movieUrl)
.then(result => {
console.log('Detalhes do Filme ou Série:', JSON.stringify(result, null, 2))
})
.catch(error => {
console.error('Erro ao buscar detalhes do filme ou série:', error.message)
})

// Usando download para baixar um torrent
const magnetURI = 'magnet:?xt=urn:btih:D430C1BF03CCEC2375E7950853DFFABDF53C366B&dn=The.Avengers.Os.Vingadores.2012.720p-WOLVERDONFILMES.COM&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'

torrent.downloadTorrent(magnetURI)
.then(result => {
console.log('Download concluído:')
console.log('Arquivo salvo em:', result.filePath)
// Escutando o progresso (caso o evento ainda esteja sendo emitido)
result.progressEmitter.on('progress', percent => {
console.log(`Progresso: ${percent}%`)
})
})
.catch(error => {
console.error('Erro ao fazer o download:', error.message)
})

// Usando stream para streaming de um torrent
torrent.streamTorrent(magnetURI)
.then(result => {
console.log('Streaming iniciado:')
// Exemplo: lendo alguns dados do stream
result.stream.on('data', chunk => {
console.log(`Recebido chunk com ${chunk.length} bytes`)
})
result.progressEmitter.on('progress', percent => {
console.log(`Progresso do streaming: ${percent}%`)
})
})
.catch(error => {
console.error('Erro ao iniciar streaming:', error.message)
})

// Usando download de maneira mais avançada para baixar um torrent
async function advancedDownload() {
try {
const result = await torrent.downloadTorrent(magnetURI)
console.log('Download iniciado com progresso dinâmico:')
// Exibe o progresso em tempo real
result.progressEmitter.on('progress', percent => {
process.stdout.write(`\rProgresso: ${percent}%`)
})
// Quando o download for concluído, exibe informações finais
console.log('\nDownload concluído:', result.filePath)
// Realiza a limpeza do engine
result.cleanup()
} catch (error) {
console.error('Erro:', error.message)
}
}
advancedDownload()

Exemplos Express

// Integração no Express
// Endpoint para streaming do torrent
app.get('/stream', async (req, res) => {
const magnetURI = 'magnet:?xt=urn:btih:D430C1BF03CCEC2375E7950853DFFABDF53C366B&dn=The.Avengers.Os.Vingadores.2012.720p-WOLVERDONFILMES.COM&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337'
try {
// Recupera o header de range, se presente
const range = req.headers.range || ''
const result = await torrent.streamTorrent(magnetURI, 0, range)
// Configura os cabeçalhos de resposta
res.writeHead(206, result.headers)
// Pipe do stream do torrent para a resposta HTTP
result.stream.pipe(res)
// Exibe o progresso no console
result.progressEmitter.on('progress', percent => {
console.log(`Streaming Progresso: ${percent}%`)
})
// Limpa o engine se o cliente encerrar a conexão
req.on('close', () => {
result.cleanup()
})
} catch (error) {
res.status(500).send(`Erro no streaming: ${error.message}`)
}
})

Redes Sociais

Conecte-se comigo:

GitHub
YouTube
WhatsApp
Instagram
Telegram


Copyright (c) 2025 Lucas Mod Domina