├── Image
├── filename.md
├── 01.jpg
├── 02.jpg
└── 03.jpg
├── README.md
└── Torrent2Drive.ipynb
/Image/filename.md:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Image/01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coko8023/Torrent-To-Google-Drive-Downloader/master/Image/01.jpg
--------------------------------------------------------------------------------
/Image/02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coko8023/Torrent-To-Google-Drive-Downloader/master/Image/02.jpg
--------------------------------------------------------------------------------
/Image/03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coko8023/Torrent-To-Google-Drive-Downloader/master/Image/03.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Torrent-To-Google-Drive-Downloader
2 | Simple notebook to stream torrent files to Google Drive using Google Colab and python3.
3 |
4 |
5 |
6 |
7 | ### Tutorial
8 | 1. Click the badge which says 'Open in Colab'.
9 | 2. Goto **File > Save a copy in Drive...** (a new tab opens with the copy of this notebook).
10 | 3. Run the whole notebook (**Runtime > Run all**).
11 | 4. Follow directions there.
12 |
13 | After download finishes the downloaded files will be in there in your drive.
14 |
15 | ### What is the purpose of it?
16 | 1. Because of Google Servers speed, I downloaded 35GB of file and the average speed was 60MBPS.
17 | 2. Because it is in the cloud, by that I mean I can access it anywhere on my phone, tablet or etc without copying file to all of them.
18 | 3. You can bypass any restrictions on torrenting set by your ISP and access your files through drive (neat isn't it!).
19 |
20 | # Screenshot
21 |
22 | 
23 |
24 | 
25 |
26 | 
27 |
28 | ### Frequently Asked Questions
29 | 1. **How get more disk space**: We can now download bigger torrents. To do it
30 |
31 | > Go to Runtime -> Change Runtime and give GPU as the Hardware Accelerator.
32 | You will get around 384GB to download any torrent you want.
33 | But this file won't be uploaded to your drive until you have that much space in drive it'll stay in colab's disk.
34 |
35 | 2. **Downloading missing files without re-downloading whole torrent**: If somehow some files are missing try to re-download torrent (just by re-running the cell). Fastresume will check files.
36 |
37 | # This whole repo is against Google Colab policy and you shouldn't be using it.
38 | > **Why are hardware resources such as T4 GPUs not available to me?**
39 | The best available hardware is prioritized for users who use Colaboratory interactively rather than for long-running computations. Users who use Colaboratory for long-running computations may be temporarily restricted in the type of hardware made available to them, and/or the duration that the hardware can be used for. We encourage users with high computational needs to use Colaboratory’s UI with a local runtime.
40 | Please note that using Colaboratory for cryptocurrency mining is disallowed entirely, and may result in being banned from using Colab altogether.
41 |
42 |
43 |
44 | ### Maintained By : [Viva Az](https://github.com/Vivaaz18)
45 | Source: https://research.google.com/colaboratory/faq.html
46 |
47 | Source: https://github.com/r12habh
48 |
--------------------------------------------------------------------------------
/Torrent2Drive.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "Torrent2Drive.ipynb",
7 | "provenance": []
8 | },
9 | "kernelspec": {
10 | "name": "python3",
11 | "display_name": "Python 3"
12 | }
13 | },
14 | "cells": [
15 | {
16 | "cell_type": "markdown",
17 | "metadata": {
18 | "id": "GTXTgHQYNNGi",
19 | "colab_type": "text"
20 | },
21 | "source": [
22 | "# 1- Install Drive"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "metadata": {
28 | "id": "aDbw0aZAN0RL",
29 | "colab_type": "code",
30 | "colab": {
31 | "base_uri": "https://localhost:8080/",
32 | "height": 121
33 | },
34 | "outputId": "dfa01a68-53a0-400f-d660-9e6b2c2f08d6"
35 | },
36 | "source": [
37 | "from google.colab import drive\n",
38 | "drive.mount('/content/drive')"
39 | ],
40 | "execution_count": 1,
41 | "outputs": [
42 | {
43 | "output_type": "stream",
44 | "text": [
45 | "Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly\n",
46 | "\n",
47 | "Enter your authorization code:\n",
48 | "··········\n",
49 | "Mounted at /content/drive\n"
50 | ],
51 | "name": "stdout"
52 | }
53 | ]
54 | },
55 | {
56 | "cell_type": "markdown",
57 | "metadata": {
58 | "id": "u9BGARG5N3oU",
59 | "colab_type": "text"
60 | },
61 | "source": [
62 | "# 2- Install Dependency Library"
63 | ]
64 | },
65 | {
66 | "cell_type": "code",
67 | "metadata": {
68 | "id": "oXOZlT5tM-jr",
69 | "colab_type": "code",
70 | "colab": {
71 | "base_uri": "https://localhost:8080/",
72 | "height": 1000
73 | },
74 | "outputId": "861fd50b-136a-4fbb-d14e-fab9e8ab778a"
75 | },
76 | "source": [
77 | "!sudo apt install uget aria2"
78 | ],
79 | "execution_count": 2,
80 | "outputs": [
81 | {
82 | "output_type": "stream",
83 | "text": [
84 | "Reading package lists... Done\n",
85 | "Building dependency tree \n",
86 | "Reading state information... Done\n",
87 | "The following additional packages will be installed:\n",
88 | " libc-ares2 libcap2-bin libgstreamer1.0-0 libnotify4 libpam-cap\n",
89 | " notification-daemon\n",
90 | "Suggested packages:\n",
91 | " gstreamer1.0-tools\n",
92 | "The following NEW packages will be installed:\n",
93 | " aria2 libc-ares2 libcap2-bin libgstreamer1.0-0 libnotify4 libpam-cap\n",
94 | " notification-daemon uget\n",
95 | "0 upgraded, 8 newly installed, 0 to remove and 32 not upgraded.\n",
96 | "Need to get 2,588 kB of archives.\n",
97 | "After this operation, 10.7 MB of additional disk space will be used.\n",
98 | "Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 libcap2-bin amd64 1:2.25-1.2 [20.6 kB]\n",
99 | "Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpam-cap amd64 1:2.25-1.2 [7,268 B]\n",
100 | "Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 libc-ares2 amd64 1.14.0-1 [37.1 kB]\n",
101 | "Get:4 http://archive.ubuntu.com/ubuntu bionic/universe amd64 aria2 amd64 1.33.1-1 [1,236 kB]\n",
102 | "Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgstreamer1.0-0 amd64 1.14.5-0ubuntu1~18.04.1 [865 kB]\n",
103 | "Get:6 http://archive.ubuntu.com/ubuntu bionic/main amd64 libnotify4 amd64 0.7.7-3 [17.3 kB]\n",
104 | "Get:7 http://archive.ubuntu.com/ubuntu bionic/main amd64 notification-daemon amd64 3.20.0-3 [36.9 kB]\n",
105 | "Get:8 http://archive.ubuntu.com/ubuntu bionic/universe amd64 uget amd64 2.2.0-1build1 [368 kB]\n",
106 | "Fetched 2,588 kB in 1s (2,778 kB/s)\n",
107 | "debconf: unable to initialize frontend: Dialog\n",
108 | "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 8.)\n",
109 | "debconf: falling back to frontend: Readline\n",
110 | "debconf: unable to initialize frontend: Readline\n",
111 | "debconf: (This frontend requires a controlling tty.)\n",
112 | "debconf: falling back to frontend: Teletype\n",
113 | "dpkg-preconfigure: unable to re-open stdin: \n",
114 | "Selecting previously unselected package libcap2-bin.\n",
115 | "(Reading database ... 144467 files and directories currently installed.)\n",
116 | "Preparing to unpack .../0-libcap2-bin_1%3a2.25-1.2_amd64.deb ...\n",
117 | "Unpacking libcap2-bin (1:2.25-1.2) ...\n",
118 | "Selecting previously unselected package libpam-cap:amd64.\n",
119 | "Preparing to unpack .../1-libpam-cap_1%3a2.25-1.2_amd64.deb ...\n",
120 | "Unpacking libpam-cap:amd64 (1:2.25-1.2) ...\n",
121 | "Selecting previously unselected package libc-ares2:amd64.\n",
122 | "Preparing to unpack .../2-libc-ares2_1.14.0-1_amd64.deb ...\n",
123 | "Unpacking libc-ares2:amd64 (1.14.0-1) ...\n",
124 | "Selecting previously unselected package aria2.\n",
125 | "Preparing to unpack .../3-aria2_1.33.1-1_amd64.deb ...\n",
126 | "Unpacking aria2 (1.33.1-1) ...\n",
127 | "Selecting previously unselected package libgstreamer1.0-0:amd64.\n",
128 | "Preparing to unpack .../4-libgstreamer1.0-0_1.14.5-0ubuntu1~18.04.1_amd64.deb ...\n",
129 | "Unpacking libgstreamer1.0-0:amd64 (1.14.5-0ubuntu1~18.04.1) ...\n",
130 | "Selecting previously unselected package libnotify4:amd64.\n",
131 | "Preparing to unpack .../5-libnotify4_0.7.7-3_amd64.deb ...\n",
132 | "Unpacking libnotify4:amd64 (0.7.7-3) ...\n",
133 | "Selecting previously unselected package notification-daemon.\n",
134 | "Preparing to unpack .../6-notification-daemon_3.20.0-3_amd64.deb ...\n",
135 | "Unpacking notification-daemon (3.20.0-3) ...\n",
136 | "Selecting previously unselected package uget.\n",
137 | "Preparing to unpack .../7-uget_2.2.0-1build1_amd64.deb ...\n",
138 | "Unpacking uget (2.2.0-1build1) ...\n",
139 | "Setting up libnotify4:amd64 (0.7.7-3) ...\n",
140 | "Setting up libpam-cap:amd64 (1:2.25-1.2) ...\n",
141 | "debconf: unable to initialize frontend: Dialog\n",
142 | "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)\n",
143 | "debconf: falling back to frontend: Readline\n",
144 | "Setting up libcap2-bin (1:2.25-1.2) ...\n",
145 | "Setting up libc-ares2:amd64 (1.14.0-1) ...\n",
146 | "Setting up notification-daemon (3.20.0-3) ...\n",
147 | "Setting up libgstreamer1.0-0:amd64 (1.14.5-0ubuntu1~18.04.1) ...\n",
148 | "Setcap worked! gst-ptp-helper is not suid!\n",
149 | "Setting up aria2 (1.33.1-1) ...\n",
150 | "Setting up uget (2.2.0-1build1) ...\n",
151 | "Processing triggers for libc-bin (2.27-3ubuntu1) ...\n",
152 | "/sbin/ldconfig.real: /usr/local/lib/python3.6/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link\n",
153 | "\n",
154 | "Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n",
155 | "Processing triggers for hicolor-icon-theme (0.17-2) ...\n",
156 | "Processing triggers for mime-support (3.60ubuntu1) ...\n"
157 | ],
158 | "name": "stdout"
159 | }
160 | ]
161 | },
162 | {
163 | "cell_type": "markdown",
164 | "metadata": {
165 | "id": "4ShhrnvTR2kP",
166 | "colab_type": "text"
167 | },
168 | "source": [
169 | "**aria2c Help command**"
170 | ]
171 | },
172 | {
173 | "cell_type": "code",
174 | "metadata": {
175 | "id": "KmmZjUpYPXoH",
176 | "colab_type": "code",
177 | "colab": {
178 | "base_uri": "https://localhost:8080/",
179 | "height": 1000
180 | },
181 | "outputId": "4362e60d-59cb-435e-f5a7-9d55589169a8"
182 | },
183 | "source": [
184 | "!aria2c -h"
185 | ],
186 | "execution_count": 6,
187 | "outputs": [
188 | {
189 | "output_type": "stream",
190 | "text": [
191 | "Usage: aria2c [OPTIONS] [URI | MAGNET | TORRENT_FILE | METALINK_FILE]...\n",
192 | "Printing options tagged with '#basic'.\n",
193 | "See 'aria2c -h#help' to know all available tags.\n",
194 | "Options:\n",
195 | " -v, --version Print the version number and exit.\n",
196 | "\n",
197 | " Tags: #basic\n",
198 | "\n",
199 | " -h, --help[=TAG|KEYWORD] Print usage and exit.\n",
200 | " The help messages are classified with tags. A tag\n",
201 | " starts with \"#\". For example, type \"--help=#http\"\n",
202 | " to get the usage for the options tagged with\n",
203 | " \"#http\". If non-tag word is given, print the usage\n",
204 | " for the options whose name includes that word.\n",
205 | "\n",
206 | " Possible Values: #basic, #advanced, #http, #https, #ftp, #metalink, #bittorrent, #cookie, #hook, #file, #rpc, #checksum, #experimental, #deprecated, #help, #all\n",
207 | " Default: #basic\n",
208 | " Tags: #basic, #help\n",
209 | "\n",
210 | " -l, --log=LOG The file name of the log file. If '-' is\n",
211 | " specified, log is written to stdout.\n",
212 | "\n",
213 | " Possible Values: /path/to/file, -\n",
214 | " Tags: #basic\n",
215 | "\n",
216 | " -d, --dir=DIR The directory to store the downloaded file.\n",
217 | "\n",
218 | " Possible Values: /path/to/directory\n",
219 | " Default: /content\n",
220 | " Tags: #basic, #file\n",
221 | "\n",
222 | " -o, --out=FILE The file name of the downloaded file. It is\n",
223 | " always relative to the directory given in -d\n",
224 | " option. When the -Z option is used, this option\n",
225 | " will be ignored.\n",
226 | "\n",
227 | " Possible Values: /path/to/file\n",
228 | " Tags: #basic, #http, #ftp, #file\n",
229 | "\n",
230 | " -s, --split=N Download a file using N connections. If more\n",
231 | " than N URIs are given, first N URIs are used and\n",
232 | " remaining URLs are used for backup. If less than\n",
233 | " N URIs are given, those URLs are used more than\n",
234 | " once so that N connections total are made\n",
235 | " simultaneously. The number of connections to the\n",
236 | " same host is restricted by the \n",
237 | " --max-connection-per-server option. See also the\n",
238 | " --min-split-size option.\n",
239 | "\n",
240 | " Possible Values: 1-*\n",
241 | " Default: 5\n",
242 | " Tags: #basic, #http, #ftp\n",
243 | "\n",
244 | " --file-allocation=METHOD Specify file allocation method.\n",
245 | " 'none' doesn't pre-allocate file space. 'prealloc'\n",
246 | " pre-allocates file space before download begins.\n",
247 | " This may take some time depending on the size of\n",
248 | " the file.\n",
249 | " If you are using newer file systems such as ext4\n",
250 | " (with extents support), btrfs, xfs or NTFS\n",
251 | " (MinGW build only), 'falloc' is your best\n",
252 | " choice. It allocates large(few GiB) files\n",
253 | " almost instantly. Don't use 'falloc' with legacy\n",
254 | " file systems such as ext3 and FAT32 because it\n",
255 | " takes almost same time as 'prealloc' and it\n",
256 | " blocks aria2 entirely until allocation finishes.\n",
257 | " 'falloc' may not be available if your system\n",
258 | " doesn't have posix_fallocate() function.\n",
259 | " 'trunc' uses ftruncate() system call or\n",
260 | " platform-specific counterpart to truncate a file\n",
261 | " to a specified length.\n",
262 | "\n",
263 | " Possible Values: none, prealloc, trunc, falloc\n",
264 | " Default: prealloc\n",
265 | " Tags: #basic, #file\n",
266 | "\n",
267 | " -V, --check-integrity[=true|false] Check file integrity by validating piece\n",
268 | " hashes or a hash of entire file. This option has\n",
269 | " effect only in BitTorrent, Metalink downloads\n",
270 | " with checksums or HTTP(S)/FTP downloads with\n",
271 | " --checksum option. If piece hashes are provided,\n",
272 | " this option can detect damaged portions of a file\n",
273 | " and re-download them. If a hash of entire file is\n",
274 | " provided, hash check is only done when file has\n",
275 | " been already download. This is determined by file\n",
276 | " length. If hash check fails, file is\n",
277 | " re-downloaded from scratch. If both piece hashes\n",
278 | " and a hash of entire file are provided, only\n",
279 | " piece hashes are used.\n",
280 | "\n",
281 | " Possible Values: true, false\n",
282 | " Default: false\n",
283 | " Tags: #basic, #metalink, #bittorrent, #file, #checksum\n",
284 | "\n",
285 | " -c, --continue[=true|false] Continue downloading a partially downloaded\n",
286 | " file. Use this option to resume a download\n",
287 | " started by a web browser or another program\n",
288 | " which downloads files sequentially from the\n",
289 | " beginning. Currently this option is only\n",
290 | " applicable to http(s)/ftp downloads.\n",
291 | "\n",
292 | " Possible Values: true, false\n",
293 | " Default: false\n",
294 | " Tags: #basic, #http, #ftp\n",
295 | "\n",
296 | " -i, --input-file=FILE Downloads URIs found in FILE. You can specify\n",
297 | " multiple URIs for a single entity: separate\n",
298 | " URIs on a single line using the TAB character.\n",
299 | " Reads input from stdin when '-' is specified.\n",
300 | " Additionally, options can be specified after each\n",
301 | " line of URI. This optional line must start with\n",
302 | " one or more white spaces and have one option per\n",
303 | " single line. See INPUT FILE section of man page\n",
304 | " for details. See also --deferred-input option.\n",
305 | "\n",
306 | " Possible Values: /path/to/file, -\n",
307 | " Tags: #basic\n",
308 | "\n",
309 | " -j, --max-concurrent-downloads=N Set maximum number of parallel downloads for\n",
310 | " every static (HTTP/FTP) URL, torrent and metalink.\n",
311 | " See also --split and --optimize-concurrent-downloads options.\n",
312 | "\n",
313 | " Possible Values: 1-*\n",
314 | " Default: 5\n",
315 | " Tags: #basic\n",
316 | "\n",
317 | " -Z, --force-sequential[=true|false] Fetch URIs in the command-line sequentially\n",
318 | " and download each URI in a separate session, like\n",
319 | " the usual command-line download utilities.\n",
320 | "\n",
321 | " Possible Values: true, false\n",
322 | " Default: false\n",
323 | " Tags: #basic\n",
324 | "\n",
325 | " -x, --max-connection-per-server=NUM The maximum number of connections to one\n",
326 | " server for each download.\n",
327 | "\n",
328 | " Possible Values: 1-16\n",
329 | " Default: 1\n",
330 | " Tags: #basic, #http, #ftp\n",
331 | "\n",
332 | " -k, --min-split-size=SIZE aria2 does not split less than 2*SIZE byte range.\n",
333 | " For example, let's consider downloading 20MiB\n",
334 | " file. If SIZE is 10M, aria2 can split file into 2\n",
335 | " range [0-10MiB) and [10MiB-20MiB) and download it\n",
336 | " using 2 sources(if --split >= 2, of course).\n",
337 | " If SIZE is 15M, since 2*15M > 20MiB, aria2 does\n",
338 | " not split file and download it using 1 source.\n",
339 | " You can append K or M(1K = 1024, 1M = 1024K).\n",
340 | "\n",
341 | " Possible Values: 1048576-1073741824\n",
342 | " Default: 20M\n",
343 | " Tags: #basic, #http, #ftp\n",
344 | "\n",
345 | " --ftp-user=USER Set FTP user. This affects all URLs.\n",
346 | "\n",
347 | " Tags: #basic, #ftp\n",
348 | "\n",
349 | " --ftp-passwd=PASSWD Set FTP password. This affects all URLs.\n",
350 | "\n",
351 | " Tags: #basic, #ftp\n",
352 | "\n",
353 | " --http-user=USER Set HTTP user. This affects all URLs.\n",
354 | "\n",
355 | " Tags: #basic, #http\n",
356 | "\n",
357 | " --http-passwd=PASSWD Set HTTP password. This affects all URLs.\n",
358 | "\n",
359 | " Tags: #basic, #http\n",
360 | "\n",
361 | " --load-cookies=FILE Load Cookies from FILE using the Firefox3 format\n",
362 | " and Mozilla/Firefox(1.x/2.x)/Netscape format.\n",
363 | "\n",
364 | " Possible Values: /path/to/file\n",
365 | " Tags: #basic, #http, #cookie\n",
366 | "\n",
367 | " -S, --show-files[=true|false] Print file listing of .torrent, .meta4 and\n",
368 | " .metalink file and exit. More detailed\n",
369 | " information will be listed in case of torrent\n",
370 | " file.\n",
371 | "\n",
372 | " Possible Values: true, false\n",
373 | " Default: false\n",
374 | " Tags: #basic, #metalink, #bittorrent\n",
375 | "\n",
376 | " --max-overall-upload-limit=SPEED Set max overall upload speed in bytes/sec.\n",
377 | " 0 means unrestricted.\n",
378 | " You can append K or M(1K = 1024, 1M = 1024K).\n",
379 | " To limit the upload speed per torrent, use\n",
380 | " --max-upload-limit option.\n",
381 | "\n",
382 | " Possible Values: 0-*\n",
383 | " Default: 0\n",
384 | " Tags: #basic, #bittorrent\n",
385 | "\n",
386 | " -u, --max-upload-limit=SPEED Set max upload speed per each torrent in\n",
387 | " bytes/sec. 0 means unrestricted.\n",
388 | " You can append K or M(1K = 1024, 1M = 1024K).\n",
389 | " To limit the overall upload speed, use\n",
390 | " --max-overall-upload-limit option.\n",
391 | "\n",
392 | " Possible Values: 0-*\n",
393 | " Default: 0\n",
394 | " Tags: #basic, #bittorrent\n",
395 | "\n",
396 | " -T, --torrent-file=TORRENT_FILE The path to the .torrent file.\n",
397 | "\n",
398 | " Possible Values: /path/to/file\n",
399 | " Tags: #basic, #bittorrent\n",
400 | "\n",
401 | " --listen-port=PORT... Set TCP port number for BitTorrent downloads.\n",
402 | " Multiple ports can be specified by using ',',\n",
403 | " for example: \"6881,6885\". You can also use '-'\n",
404 | " to specify a range: \"6881-6999\". ',' and '-' can\n",
405 | " be used together.\n",
406 | "\n",
407 | " Possible Values: 1024-65535\n",
408 | " Default: 6881-6999\n",
409 | " Tags: #basic, #bittorrent\n",
410 | "\n",
411 | " --enable-dht[=true|false] Enable IPv4 DHT functionality. It also enables\n",
412 | " UDP tracker support. If a private flag is set\n",
413 | " in a torrent, aria2 doesn't use DHT for that\n",
414 | " download even if ``true`` is given.\n",
415 | "\n",
416 | " Possible Values: true, false\n",
417 | " Default: true\n",
418 | " Tags: #basic, #bittorrent\n",
419 | "\n",
420 | " --dht-listen-port=PORT... Set UDP listening port used by DHT(IPv4, IPv6)\n",
421 | " and UDP tracker. Multiple ports can be specified\n",
422 | " by using ',', for example: \"6881,6885\". You can\n",
423 | " also use '-' to specify a range: \"6881-6999\".\n",
424 | " ',' and '-' can be used together.\n",
425 | "\n",
426 | " Possible Values: 1024-65535\n",
427 | " Default: 6881-6999\n",
428 | " Tags: #basic, #bittorrent\n",
429 | "\n",
430 | " --enable-dht6[=true|false] Enable IPv6 DHT functionality.\n",
431 | " Use --dht-listen-port option to specify port\n",
432 | " number to listen on. See also --dht-listen-addr6\n",
433 | " option.\n",
434 | "\n",
435 | " Possible Values: true, false\n",
436 | " Default: false\n",
437 | " Tags: #basic, #bittorrent\n",
438 | "\n",
439 | " --dht-listen-addr6=ADDR Specify address to bind socket for IPv6 DHT. \n",
440 | " It should be a global unicast IPv6 address of the\n",
441 | " host.\n",
442 | "\n",
443 | " Tags: #basic, #bittorrent\n",
444 | "\n",
445 | " -M, --metalink-file=METALINK_FILE The file path to the .meta4 and .metalink\n",
446 | " file. Reads input from stdin when '-' is\n",
447 | " specified.\n",
448 | "\n",
449 | " Possible Values: /path/to/file, -\n",
450 | " Tags: #basic, #metalink\n",
451 | "\n",
452 | "URI, MAGNET, TORRENT_FILE, METALINK_FILE:\n",
453 | " You can specify multiple HTTP(S)/FTP URIs. Unless you specify -Z option, all\n",
454 | " URIs must point to the same file or downloading will fail.\n",
455 | " You can also specify arbitrary number of BitTorrent Magnet URIs, torrent/\n",
456 | " metalink files stored in a local drive. Please note that they are always\n",
457 | " treated as a separate download.\n",
458 | "\n",
459 | " You can specify both torrent file with -T option and URIs. By doing this,\n",
460 | " download a file from both torrent swarm and HTTP/FTP server at the same time,\n",
461 | " while the data from HTTP/FTP are uploaded to the torrent swarm. For single file\n",
462 | " torrents, URI can be a complete URI pointing to the resource or if URI ends\n",
463 | " with '/', 'name' in torrent file is added. For multi-file torrents, 'name' and\n",
464 | " 'path' in torrent are added to form a URI for each file.\n",
465 | "\n",
466 | " Make sure that URI is quoted with single(') or double(\") quotation if it\n",
467 | " contains \"&\" or any characters that have special meaning in shell.\n",
468 | "\n",
469 | "About the number of connections\n",
470 | " Since 1.10.0 release, aria2 uses 1 connection per host by default and has 20MiB\n",
471 | " segment size restriction. So whatever value you specify using -s option, it\n",
472 | " uses 1 connection per host. To make it behave like 1.9.x, use\n",
473 | " --max-connection-per-server=4 --min-split-size=1M.\n",
474 | "\n",
475 | "Refer to man page for more information.\n"
476 | ],
477 | "name": "stdout"
478 | }
479 | ]
480 | },
481 | {
482 | "cell_type": "markdown",
483 | "metadata": {
484 | "id": "JHcQIsQbR2i5",
485 | "colab_type": "text"
486 | },
487 | "source": [
488 | ""
489 | ]
490 | },
491 | {
492 | "cell_type": "markdown",
493 | "metadata": {
494 | "id": "bCWFmaTdOIvR",
495 | "colab_type": "text"
496 | },
497 | "source": [
498 | "# 3- Download torrent"
499 | ]
500 | },
501 | {
502 | "cell_type": "markdown",
503 | "metadata": {
504 | "id": "NqJ4AKztOk1q",
505 | "colab_type": "text"
506 | },
507 | "source": [
508 | "**3.1- Change Directory to your save-path**"
509 | ]
510 | },
511 | {
512 | "cell_type": "code",
513 | "metadata": {
514 | "id": "IyKWOSVKOJnj",
515 | "colab_type": "code",
516 | "colab": {
517 | "base_uri": "https://localhost:8080/",
518 | "height": 34
519 | },
520 | "outputId": "f92cd4c9-3fe0-4f69-a09f-4403b056222f"
521 | },
522 | "source": [
523 | "# for Simple Drive\n",
524 | "%cd '/content/drive/My Drive' \n",
525 | "\n",
526 | "# for Team Drive if existe\n",
527 | "# %cd '/content/drive/Shared drives/your_team_drive/' "
528 | ],
529 | "execution_count": 10,
530 | "outputs": [
531 | {
532 | "output_type": "stream",
533 | "text": [
534 | "/content/drive/My Drive\n"
535 | ],
536 | "name": "stdout"
537 | }
538 | ]
539 | },
540 | {
541 | "cell_type": "markdown",
542 | "metadata": {
543 | "id": "NbXyYvBGO8xp",
544 | "colab_type": "text"
545 | },
546 | "source": [
547 | "**3.2- Download torrent**"
548 | ]
549 | },
550 | {
551 | "cell_type": "code",
552 | "metadata": {
553 | "id": "bbXDrkz8PbtZ",
554 | "colab_type": "code",
555 | "colab": {
556 | "base_uri": "https://localhost:8080/",
557 | "height": 706
558 | },
559 | "outputId": "5371c823-c799-42f8-8802-398063a8562e"
560 | },
561 | "source": [
562 | "#--seed-time=0 if no seed\n",
563 | "!aria2c --seed-time=0 -Z 'https://nyaa.si/download/1250160.torrent'"
564 | ],
565 | "execution_count": 5,
566 | "outputs": [
567 | {
568 | "output_type": "stream",
569 | "text": [
570 | "\n",
571 | "06/02 13:42:32 [\u001b[1;32mNOTICE\u001b[0m] Downloading 1 item(s)\n",
572 | "\r\r\u001b[0m\n",
573 | "06/02 13:42:33 [\u001b[1;32mNOTICE\u001b[0m] Download complete: /content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4.torrent\n",
574 | "\n",
575 | "06/02 13:42:33 [\u001b[1;31mERROR\u001b[0m] Exception caught while loading DHT routing table from /root/.cache/aria2/dht.dat\n",
576 | "Exception: [DHTRoutingTableDeserializer.cc:83] errorCode=1 Failed to load DHT routing table from /root/.cache/aria2/dht.dat\n",
577 | "\n",
578 | "06/02 13:42:33 [\u001b[1;32mNOTICE\u001b[0m] IPv4 DHT: listening on UDP port 6908\n",
579 | "\n",
580 | "06/02 13:42:33 [\u001b[1;32mNOTICE\u001b[0m] IPv4 BitTorrent: listening on TCP port 6901\n",
581 | "\n",
582 | "06/02 13:42:33 [\u001b[1;31mERROR\u001b[0m] IPv6 BitTorrent: failed to bind TCP port 6901\n",
583 | "Exception: [SocketCore.cc:312] errorCode=1 Failed to bind a socket, cause: Name or service not known\n",
584 | " *** Download Progress Summary as of Tue Jun 2 13:43:33 2020 *** \n",
585 | "=\n",
586 | "[#653722 166MiB/2.0GiB(8%) CN:44 SD:25 DL:6.3MiB UL:0B(108KiB) ETA:5m2s]\n",
587 | "FILE: /content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4\n",
588 | "-\n",
589 | "\n",
590 | " *** Download Progress Summary as of Tue Jun 2 13:44:33 2020 *** \n",
591 | "=\n",
592 | "[#653722 2.0GiB/2.0GiB(99%) CN:44 SD:31 DL:46MiB UL:7.5KiB(204KiB)]\n",
593 | "FILE: /content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4\n",
594 | "-\n",
595 | "\n",
596 | "\u001b[0m\n",
597 | "06/02 13:44:33 [\u001b[1;32mNOTICE\u001b[0m] Seeding is over.\n",
598 | "\u001b[0m\n",
599 | "06/02 13:44:35 [\u001b[1;32mNOTICE\u001b[0m] Download complete: /content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4\n",
600 | "\n",
601 | "06/02 13:44:35 [\u001b[1;32mNOTICE\u001b[0m] Your share ratio was 0.0, uploaded/downloaded=204KiB/2.0GiB\n",
602 | "\u001b[0m\n",
603 | "Download Results:\n",
604 | "gid |stat|avg speed |path/URI\n",
605 | "======+====+===========+=======================================================\n",
606 | "f1ab08|\u001b[1;32mOK\u001b[0m | 572KiB/s|/content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4.torrent\n",
607 | "653722|\u001b[1;32mOK\u001b[0m | 17MiB/s|/content/[Ohys-Raws] Tenki no Ko (BD 1280x720 x264 AAC).mp4\n",
608 | "\n",
609 | "Status Legend:\n",
610 | "(OK):download completed.\n"
611 | ],
612 | "name": "stdout"
613 | }
614 | ]
615 | }
616 | ]
617 | }
--------------------------------------------------------------------------------