ShareSpark

 

Author Topic: How To use COLAB..? [Script Tool] complete Toutiral (Easy to understand Everyone)  (Read 262 times)

0 Members and 1 Guest are viewing this topic.

Online ʀᴅᴋɴɪɢʜᴛ-sʀ

  • Topic Author
  • V.I.P.
  • Legend Member
  • *
  • Thanked: 1849
  • Reputation: 71
  • Activity:
    100%
  • Join Date: Nov 2020
  • Location: ㅤㅤㅤㅤ
  • Age: Age
  • Posts: 1907
  • @RDKNIGHT-SR
Quote from: [RDKNIGHT-SR

How To use COLAB..?  c
omplete Toutiral (Esy to understand Everyone)

1st Tutorial for only torrent.


Follow me -

Colab Official website Link-

Visit The website-

Code: You are not allowed to view links. Register or Login

https://colab.research.google.com/


Alternative Link - [available but not working properly]

Crate a new notebook and paste commends.

Enter 1st script' then Crate a new notebook and paste commends.
Enter 2nd script' Crate a new notebook and paste commends.
Enter 3rd script.

Complete.

Drive Torrent
Torrent to Google Drive Downloader-

1st- script

Mount Google Drive
To stream files we need to mount Google Drive.
______________________________
Code: You are not allowed to view links. Register or Login

from google.colab import drive
drive.mount('/content/drive')

______________________________

2nd script-

Install Dependency.
________________________

Code: You are not allowed to view links. Register or Login

!apt install python3-libtorrent

__________________________
Add Torrent and Start Download.

3rd script-

Add Torrent and Start Download.
___________________________

_____________________________

Code: You are not allowed to view links. Register or Login

import libtorrent as lt
import time
import datetime

ses = lt.session()
ses.listen_on(6881, 6891)
params = {
    'save_path': '/content/drive/My Drive/Torrent/',
    'storage_mode': lt.storage_mode_t(2),
    'paused': False,
    'auto_managed': True,
    'duplicate_is_error': True}

link = input("Enter Torrent/Magnet Link:")

handle = lt.add_magnet_uri(ses, link, params)
ses.start_dht()

begin = time.time()
print(datetime.datetime.now())

print ('Downloading Metadata...')
while (not handle.has_metadata()):
    time.sleep(1)
print ('Got Metadata, Starting Torrent Download...')

print("Starting", handle.name())

while (handle.status().state != lt.torrent_status.seeding):
    s = handle.status()
    state_str = ['queued', 'checking', 'downloading metadata', \
            'downloading', 'finished', 'seeding', 'allocating']
    print ('%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s ' % \
            (s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \
            s.num_peers, state_str[s.state]))
    time.sleep(5)

end = time.time()
print(handle.name(), "COMPLETE")

print("Elapsed Time: ",int((end-begin)//60),"min :", int((end-begin)%60), "sec")

print(datetime.datetime.now())

__________________________

Done' Start Torrent Download-



« Last Edit: February 28, 2021, 07:05:52 PM by [𝗥𝗗𝗞𝗡𝗜𝗚𝗛𝗧-𝗦𝗥]™ »
0:0 ━━━━ ● ───────── 00.00

⇆ ◁ ㅤ ㅤ ❚❚ ㅤ ㅤ ▷ ↻



:yahoo:    ▁ ▂ ▃ ▅ ▆ ▇ █ 🅁🄳🄺🄽🄸🄶🄷🅃-🅂🅁 █ ▇ ▆ ▅ ▃ ▂   ▁ :yahoo:
 
The following users thanked this post: Truemate, aham, Navi672k

Offline Navi672k

  • Newbie
  • *
  • Reputation: 0
  • Activity:
    0%
  • Join Date: Dec 2020
  • Posts: 1
 

Offline Truemate

  • Uploader
  • Devoted Member
  • *
  • Thanked: 47
  • Reputation: 5
  • Activity:
    2.8%
  • Join Date: Nov 2019
  • Posts: 104
  • Gender: Male
  • woooooooooooooo
Quote from: [RDKNIGHT-SR

1st Tutorial for only torrent.

Crate a new notebook and paste commends.

Enter 1st script' then Crate a new notebook and paste commends.
Enter 2nd script' Crate a new notebook and paste commends.
Enter 3rd script.

Complete.

what ???
that sounds like 1st & 2nd script should be created in two new notebook  ???


btw, there some PROB in this tut....
the 2nd script wont do the job... this Error ModuleNotFound-- jab libtorrent he nahi ho paya..toh ageh kaise chalega process !!

Quote
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-fdcd82f4f3c7> in <module>()
----> 1 import libtorrent as lt
      2 import time
      3 import datetime
      4
      5 ses = lt.session()

ModuleNotFoundError: No module named 'libtorrent'

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt
.


After some research, i get my hand on this command

Code: You are not allowed to view links. Register or Login
!python -m pip install --upgrade pip setuptools wheel
!python -m pip install lbry-libtorrent
now it shows Installing collected packages: lbry-libtorrent
Successfully installed lbry-libtorrent-1.2.4
means libtorrent is properly installed and ready to use......


  • Now jump to nxt step that's 3rd script....

click the pic....as pic speaks louder than words...
You are not allowed to view links. Register or Login

Now when i just press enter in that box.. this below error it showing

Quote
magnet:?xt=urn:btih:174C8F58C6105C91AB07C1370CEEFF6D04F17C1B&:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-5d2863a0f333> in <module>()
     15 link = input("magnet:?xt=urn:btih:174C8F58C6105C91AB07C1370CEEFF6D04F17C1B&:")
     16
---> 17 handle = lt.add_magnet_uri(ses, link, params)
     18 ses.start_dht()
     19

KeyError: 'unknown name in torrent params: paused'


can anyone sort out this !!!


Hint/Suggestion - whenever sharing tuts..always post some screenshots of those tuts steps.. this will help to learn the methods very easily...


« Last Edit: March 01, 2021, 04:39:53 AM by Truemate »
yoooooooooo
 

Tags:
 

SimplePortal 2.3.7 © 2008-2021, SimplePortal