Giter VIP home page Giter VIP logo

shakilofficial0 / heroku-cybertor Goto Github PK

View Code? Open in Web Editor NEW
55.0 5.0 106.0 479 KB

CyberTor is Updated Version of Telegram Torrent Bot with some new Features. Use it and Be Smart. :four_leaf_clover: :four_leaf_clover:

License: GNU General Public License v3.0

JavaScript 69.18% HTML 3.91% CSS 26.91%
torrent torrent-downloader torrent-client heroku herokuapp heroku-app telegram-bot telegram google-drive-uploader leecher

heroku-cybertor's Introduction

Heroku-CyberTOR

GitHub GitHub

Quick Launch:

Deploy

Username: alpha

Password: alpha

Make sure There is no (space) at the start of User/Pass.

TODO after deploy

Compulsory

If You dont complete this step, Google Drive and Torrent Search from Your SITE will not work.

  1. Fork The Repository

  2. Go to Settings of Your Created App.

  3. Scroll and You will find Buildpacks

  4. Press Add Buildpacks and Paste the Link https://github.com/jontewks/puppeteer-heroku-buildpack.git as Buildpacks URL. Press Save Changes

  5. Go to the Deploy Section from the TOP. And Link Your Repository. For this, Go to Deployment method and Select Github. Below You will find a Option To search Your Repository. Find it And Press Connect.

6.Scroll And You will find Manual deploy. Make Sure You are choosed master in Choose a branch to deploy section. Just Press Deploy.

It will take About 2-5min to Complete the Deployment.

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 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

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.

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

For 1337x env var name will be 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

Copyright

The Script is a Child Script of patheticGeek/torrent-aio-bot

heroku-cybertor's People

Contributors

dependabot[bot] avatar shakilofficial0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

heroku-cybertor's Issues

#deleting old downloaded files feature

Hello dear developer, I really love this bot. But I can't delete old downloaded files from server. I need it to free up server space. Please add this feature to bot! Thanks in advance

TG Bot not responding

I have set env variables correctly restarted all dynos multiple times.
Sent /start /help to my bot but it's not responding.

Logs:
app[web.1]: Bot ready
app[web.1]: web allowed
app[web.1]: > Running on http://localhost:xxxx
app[web.1]:
app[web.1]: Gdrive client up

Google drive upload not working

I have successfully connected my Google drive folder (I can see the contents of my gdrive folder in the Drive tab)
Unfortunately, the downloaded ISO is not being uploaded to drive

I'm using the Web UI for my use case and just downloaded a 2.1 GB ubuntu ISO from thepiratebay
Also, when I click on the Download button after the download is complete, I don't see any google drive status txt file (as mentioned in the README), the downloaded folder is there but the file is no longer present inside so I can't even download it directly from Heroku.

Any ideas what may be going wrong here?

Thanks

(Big file)Downloads stop after some random time and progress

I'm using a telegram bot for the downloading-uploading work and not one out of the two downloads that I started have completed successfully. They have stopped after some random progress(not a problem from the 'SITE' key config which is already added). I'm attaching screenshot (a little long one) from my tg bot.

IMG_20210509_185424

Cannot deploy in herku

I cannot deploy the app in heroku

Log
-----> Node.js app detected

-----> Creating runtime environment

   NPM_CONFIG_LOGLEVEL=error
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   NODE_VERBOSE=false

-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)

   Resolving node version 12.x...
   Downloading and installing node 12.18.4...
   Using default npm version: 6.14.6

-----> Installing dependencies
Installing node modules
npm ERR! code EINTEGRITY
npm ERR! sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== integrity checksum failed when using sha512: wanted sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== but got sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==. (13840 bytes)

   npm ERR! A complete log of this run can be found in:
   npm ERR!     /tmp/npmcache.vgdVd/_logs/2020-09-29T21_34_09_623Z-debug.log

-----> Build failed

   We're sorry this build is failing! You can troubleshoot common issues here:
   https://devcenter.heroku.com/articles/troubleshooting-node-deploys
   
   Some possible problems:
   
   - Node version not specified in package.json
     https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
   
   Love,
   Heroku

! Push rejected, failed to compile Node.js app.
! Push failed

Web authentication error

After the deploying the heroku app, the website showing an error while login with username alpha. "You are not allowed to access this account. Because it's in private mode."

Kindly let me know how to resolve this

Request for Cloning

Hello! I really love this bot, but I'd really love it if this bot had the ability to clone gdrive links. I copy a lot of stuff from gdrive so this feature would make it easier for me. Please consider adding it! ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.