tor-dl 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -12
- package/dist/sources/registry.d.ts.map +1 -1
- package/dist/sources/registry.js +7 -18
- package/dist/sources/registry.js.map +1 -1
- package/package.json +1 -1
- package/sources.json +1 -1
- package/src/sources/registry.ts +7 -18
package/README.md
CHANGED
|
@@ -51,10 +51,13 @@ tor-dl search <query> [options]
|
|
|
51
51
|
- `games` - Games
|
|
52
52
|
- `apps` - Applications
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
## Supported Sources
|
|
55
|
+
|
|
56
|
+
| Source | Categories | Description |
|
|
57
|
+
|--------|------------|-------------|
|
|
58
|
+
| YTS | movie | Movie torrents with direct .torrent download |
|
|
59
|
+
| The Pirate Bay | all | General torrent search |
|
|
60
|
+
| Nyaa | anime, tv | Anime and Japanese media |
|
|
58
61
|
|
|
59
62
|
**Examples:**
|
|
60
63
|
|
|
@@ -109,14 +112,6 @@ tor-dl open <number>
|
|
|
109
112
|
| `-v, --version` | Show version number |
|
|
110
113
|
| `-h, --help` | Show help information |
|
|
111
114
|
|
|
112
|
-
## Supported Sources
|
|
113
|
-
|
|
114
|
-
| Source | Categories | Description |
|
|
115
|
-
|--------|------------|-------------|
|
|
116
|
-
| YTS | movie | Movie torrents with direct .torrent download |
|
|
117
|
-
| The Pirate Bay | all | General torrent search |
|
|
118
|
-
| Nyaa | anime, tv | Anime and Japanese media |
|
|
119
|
-
|
|
120
115
|
## Size Format
|
|
121
116
|
|
|
122
117
|
Size can be specified in various formats:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOpE,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAQ3C,CAAC;AAEF,wBAAgB,iBAAiB,IAAI,WAAW,CAM/C;AAED,wBAAgB,iBAAiB,IAAI,aAAa,EAAE,CAenD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAGtE;AAED,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAE9D;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/sources/registry.js
CHANGED
|
@@ -11,33 +11,22 @@ exports.getUpdateUrl = getUpdateUrl;
|
|
|
11
11
|
exports.getAllScrapers = getAllScrapers;
|
|
12
12
|
const fs_1 = require("fs");
|
|
13
13
|
const path_1 = require("path");
|
|
14
|
-
const eztv_1 = __importDefault(require("./eztv"));
|
|
15
|
-
const solidtorrents_1 = __importDefault(require("./solidtorrents"));
|
|
16
14
|
const thepiratebay_1 = __importDefault(require("./thepiratebay"));
|
|
17
|
-
const torlock_1 = __importDefault(require("./torlock"));
|
|
18
|
-
const torrentproject_1 = __importDefault(require("./torrentproject"));
|
|
19
15
|
const torrentscsv_1 = __importDefault(require("./torrentscsv"));
|
|
20
|
-
const limetorrent_1 = __importDefault(require("./limetorrent"));
|
|
21
|
-
const _1337x_1 = __importDefault(require("./1337x"));
|
|
22
|
-
const rarbg_1 = __importDefault(require("./rarbg"));
|
|
23
16
|
const yts_1 = __importDefault(require("./yts"));
|
|
24
17
|
const nyaa_1 = __importDefault(require("./nyaa"));
|
|
25
18
|
const scrapers = {
|
|
26
|
-
|
|
27
|
-
solidtorrents: solidtorrents_1.default,
|
|
28
|
-
thepiratebay: thepiratebay_1.default,
|
|
29
|
-
torlock: torlock_1.default,
|
|
30
|
-
torrentproject: torrentproject_1.default,
|
|
31
|
-
torrentscsv: torrentscsv_1.default,
|
|
32
|
-
limetorrent: limetorrent_1.default,
|
|
33
|
-
'1337x': _1337x_1.default,
|
|
34
|
-
rarbg: rarbg_1.default,
|
|
19
|
+
// Supported working scrapers only
|
|
35
20
|
yts: yts_1.default,
|
|
36
|
-
|
|
21
|
+
thepiratebay: thepiratebay_1.default,
|
|
22
|
+
nyaa: nyaa_1.default,
|
|
23
|
+
torrentscsv: torrentscsv_1.default
|
|
24
|
+
// Unsupported scrapers (frequently blocked/change structure):
|
|
25
|
+
// eztv, solidtorrents, torlock, torrentproject, limetorrent, '1337x', rarbg
|
|
37
26
|
};
|
|
38
27
|
exports.scrapers = scrapers;
|
|
39
28
|
function loadSourcesConfig() {
|
|
40
|
-
const sourcesPath = (0, path_1.join)(
|
|
29
|
+
const sourcesPath = (0, path_1.join)(__dirname, '../../sources.json');
|
|
41
30
|
if ((0, fs_1.existsSync)(sourcesPath)) {
|
|
42
31
|
return JSON.parse((0, fs_1.readFileSync)(sourcesPath, 'utf-8'));
|
|
43
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/sources/registry.ts"],"names":[],"mappings":";;;;;;AAmBA,8CAMC;AAED,8CAeC;AAED,0CAGC;AAED,oCAGC;AAED,wCAEC;AAxDD,2BAA8C;AAC9C,+BAA4B;AAG5B,kEAA0C;AAC1C,gEAAwC;AACxC,gDAAwB;AACxB,kDAA0B;AAE1B,MAAM,QAAQ,GAAkC;IAC9C,kCAAkC;IAClC,GAAG,EAAH,aAAG;IACH,YAAY,EAAZ,sBAAY;IACZ,IAAI,EAAJ,cAAI;IACJ,WAAW,EAAX,qBAAW;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B,cAAc;IAC5B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
package/sources.json
CHANGED
package/src/sources/registry.ts
CHANGED
|
@@ -2,34 +2,23 @@ import { readFileSync, existsSync } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { SourcesJSON, SourceConfig, SourceScraper } from '../types';
|
|
4
4
|
|
|
5
|
-
import eztv from './eztv';
|
|
6
|
-
import solidtorrents from './solidtorrents';
|
|
7
5
|
import thepiratebay from './thepiratebay';
|
|
8
|
-
import torlock from './torlock';
|
|
9
|
-
import torrentproject from './torrentproject';
|
|
10
6
|
import torrentscsv from './torrentscsv';
|
|
11
|
-
import limetorrent from './limetorrent';
|
|
12
|
-
import _1337x from './1337x';
|
|
13
|
-
import rarbg from './rarbg';
|
|
14
7
|
import yts from './yts';
|
|
15
8
|
import nyaa from './nyaa';
|
|
16
9
|
|
|
17
10
|
const scrapers: Record<string, SourceScraper> = {
|
|
18
|
-
|
|
19
|
-
solidtorrents,
|
|
20
|
-
thepiratebay,
|
|
21
|
-
torlock,
|
|
22
|
-
torrentproject,
|
|
23
|
-
torrentscsv,
|
|
24
|
-
limetorrent,
|
|
25
|
-
'1337x': _1337x,
|
|
26
|
-
rarbg,
|
|
11
|
+
// Supported working scrapers only
|
|
27
12
|
yts,
|
|
28
|
-
|
|
13
|
+
thepiratebay,
|
|
14
|
+
nyaa,
|
|
15
|
+
torrentscsv
|
|
16
|
+
// Unsupported scrapers (frequently blocked/change structure):
|
|
17
|
+
// eztv, solidtorrents, torlock, torrentproject, limetorrent, '1337x', rarbg
|
|
29
18
|
};
|
|
30
19
|
|
|
31
20
|
export function loadSourcesConfig(): SourcesJSON {
|
|
32
|
-
const sourcesPath = join(
|
|
21
|
+
const sourcesPath = join(__dirname, '../../sources.json');
|
|
33
22
|
if (existsSync(sourcesPath)) {
|
|
34
23
|
return JSON.parse(readFileSync(sourcesPath, 'utf-8'));
|
|
35
24
|
}
|