• Stars
    star
    306
  • Rank 136,456 (Top 3 %)
  • Language
    JavaScript
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A bot for searching and downloading torrents easily with website and telegram bot

Torrent all-in-one bot

Lorem ipsum i am too lazy figure what it does yourself

You might be lazy too so here ya go:

Deploy

Please dont start a test torrent download on my website it works you dont need to just wastes my drive space. Be careful when adding torrents to my deployment as it is deployed everytime i commit code here so your downloads may be interrupted.

The search section is currently unmaintained due to the inconsistency between proxy sites and their uptimes

TODO after deploy

To disable website

If you only want telegram bot to be workinh set value of DISABLE_WEB env var to true.

To get torrent download working:

Set a variable with key "SITE" and value is the link of your site. eg. "https://<project name>.herokuapp.com". This is important to keep bot alive or server will stop after 30 min of inactivity.

To start a torrent bot:

Set a enviorment variable with key "TELEGRAM_TOKEN" and token of your bot as value. How to get token To set a enviorment variable go to heroku dashboard open the app then go to Settings > Config vars > Reveal Config vars.

To get search working:

The library used for web scrapping the torrent sites requires a custom buildpack on heroku. By default the search will happen on your deployment and you will need to configure the buildpack as described below. But if you don't want to do that you can specify and env SEARCH_SITE and set value to https://torrent-aio-bot.herokuapp.com/ . The frwd slash at end is necessary. This will make all the searches go thru my deployment and you don't need to configure buildpack.

Go to the build packs section in settings and click add buildpack and enter "https://github.com/jontewks/puppeteer-heroku-buildpack.git" as buildpack url then click save changes. And then do a dummy git commit so that heroku will buid it using the buildpack this time. Then set the SEARCH_SITE env to same value as SITE.

To get gdrive upload:

  1. Go to https://developers.google.com/drive/api/v3/quickstart/nodejs and click on Enable the Drive API copy client id and set an enviorment variable in heroku with name CLIENT_ID then copy client secret and set another env named CLIENT_SECRET.
  2. Goto https://<project name>.herokuapp.com/drivehelp and paste your client id and secret and click "Get auth code", it will redirect you to login and you'll get a auth code after login paste that auth code in the auth code feild and click "Generate token" it'll give you a token. now set these as env variable CLIENT_ID, CLIENT_SECRET, AUTH_CODE and TOKEN.
  3. By default files are uploaded in the root of drive if you dont want to upload in root folder make a folder copy its id and set a env var GDRIVE_PARENT_FOLDER and value id of desired folder. The folder id will be the last part of the url such as in url "https://drive.google.com/drive/folders/1rpk7tGWs_lv_kZ_W4EPaKj8brfFVLOH-" the folder id is "1rpk7tGWs_lv_kZ_W4EPaKj8brfFVLOH-".
  4. If you want team drive support open your teamdrive and copy the folder id from url eg. https://drive.google.com/drive/u/0/folders/0ABZHZpfYfdVCUk9PVA this is link of a team drive copy the last part "0ABZHZpfYfdVCUk9PVA" this will be your GDRIVE_PARENT_FOLDER. If you want them in a folder in teamdrive open the folder and use that folder's id instead.
  5. You're good to go. The gdrive status will be shown in gdrive.txt file when you click Open on the website downloads page. Bot wil automatically send you drive link when its uploaded.

Use this torrent for testing or when downloading to setup drive it is well seeded and downloads in ~10s

magnet:?xt=urn:btih:dd8255ecdc7ca55fb0bbf81323d87062db1f6d1c&dn=Big+Buck+Bunny

Changing the sites used for searching

To change the pirate bay site, visit the site you would like to use search something there, copy the url eg. https://thepiratebay.org/search/whatisearched and replace the search with {term} so the url looks like https://thepiratebay.org/search/{term} ans set this to env var PIRATEBAY_SITE

Same, if you want to change the limetorrents site visit the site you want to use and search for something, then replace the thing you searched for with {term} so final url looks like https://limetorrents.at/search?search={term} and set this value to env var LIMETORRENT_SITE

Simillarly the enviorment variable for 1337x is O337X_SITE

API Endpoints

Prefix: https://<project name>.herokuapp.com/api/v1

For downloading:

Endpoint Params Return
/torrent/download link: string { error: bool, link: string, infohash: string errorMessage?: string }
/torrent/list none {error: bool, torrents: [ torrent, torrent, ... ]}
/torrent/remove link: string { error: bool, errorMessage?: string }
/torrent/status link: string {error: bool, status: torrent, errorMessage?: string}

link is magnet uri of the torrent

torrent:  {
  magnetURI: string,
  speed: string,
  downloaded: string,
  total: string,
  progress: number,
  timeRemaining: number,
  redableTimeRemaining: string,
  downloadLink: string,
  status: string,
  done: bool
}

For searching:

Endpoint Params Return
/search/{site} query: string, site?: string {error: bool, results: [ result, ... ], totalResults: number, }
/details/{site} query: string {error: bool, torrent }

query is what you want to search for or the link of the torrent page site is the link to homepage of proxy to use must have a trailing '/'

result: {
  name: string,
  link: string,
  seeds: number,
  details: string
}

torrent: {
  title: string,
  info: string,
  downloadLink: string,
  details: [ { infoTitle: string, infoText: string } ]
}

sites available: piratebay, 1337x, limetorrent

More Repositories

1

gdrive-index

An index server for Google Drive
JavaScript
106
star
2

wa-automation

WhatsApp chatbot weekend project to create stickers and run code in any language in chat
JavaScript
18
star
3

chrome-bookmark-exporter

An extension to export your chrome bookmarks in a sane way.
TypeScript
13
star
4

ping-pong-bot

A bot to ping site periodically to keep it alive on heroku
JavaScript
13
star
5

use-favicon

A simple react hook to show a dynamic favicon
TypeScript
7
star
6

improved-potato

Chrome extension to export bookmarks sanely
TypeScript
7
star
7

react-dimension-select

A simple library to easily create a dimension selector
TypeScript
6
star
8

prjkt

Easily start a new project without the burden of remembering 10 things to do
Go
5
star
9

pathetic_geek-bot

Finally decided to sit down and make a discord bot the right way.
TypeScript
3
star
10

linkefy

A highly customizable link aggregator made with react and firebase
JavaScript
3
star
11

portfolio

My minimalist portfolio site
Svelte
3
star
12

piratebay-adfree

JavaScript
2
star
13

flamingo_ebook

E-book reader app design implemented in flutter
Dart
2
star
14

competitive-code

A repo for solutions i write to competitive problems. Language depends on my mood deal with it!
C++
2
star
15

patheticgeek.dev

My old online portfolio
CSS
2
star
16

linkedin-automation

Automate accepting and sending connection requests on LinkedIn.
Python
2
star
17

monorepo_template

My monorepo template
TypeScript
2
star
18

task-manager-chakra

A task management app made to learn chakra ui
JavaScript
2
star
19

imdb-api

An API for scrapping data on IMDB website about a movie or webseries
JavaScript
1
star
20

upgraded-sniffle

A basic whatsapp bot for my basic needs
TypeScript
1
star
21

pg-discord-bot-boilerplate

Boilerplate for discord bot in typescript and nodejs
TypeScript
1
star
22

flutter_facebook_responsive_ui

Facebook UI clone to practice building UIs in flutter
Dart
1
star
23

portfolio-v2

My minimalist portfolio
XSLT
1
star
24

learning_rails

Starting to learn rails ;)
Ruby
1
star
25

nextjs-bloat

My try to clone a UI kit in custom css
JavaScript
1
star
26

jay-portfolio

TypeScript
1
star
27

pathetics-extension-pack

My VS Code extension pack, containing the extensions I love to use
1
star
28

compatability-check

Tutorial project to teach MERN and see who your friend's crush is
JavaScript
1
star
29

prjkt-templates

A repo for storing default actions for prjkt.
1
star
30

next-ts-api

Typesafe Next API routes with ez
TypeScript
1
star
31

pg-chrome-extention-boilerplate

Boilerplate for a chrome extention
TypeScript
1
star
32

discord-meme-bot

A discord bot to create memes in chat
JavaScript
1
star
33

learning-solidity

My one day trip to the blockchain world
JavaScript
1
star
34

flutter_github_actions

Flutter apk automation with github actions
Dart
1
star
35

patheticGeek

My GitHub profile readme
1
star
36

.dotfiles

My config files and shell script to manage them
Shell
1
star
37

pg-vite-boilerplate

A Vitejs project's boilerplate code
TypeScript
1
star
38

react-native-rncn

Implementation of `className` and customizable UI components in React Native
JavaScript
1
star
39

pg-nextjs-boilerplate

NextJS project boilerplate code
TypeScript
1
star