tor-dl 1.0.9 → 1.0.11

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 CHANGED
@@ -55,9 +55,9 @@ tor-dl search <query> [options]
55
55
 
56
56
  | Source | Categories | Description |
57
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
+ | yts | movie | Movie torrents with direct .torrent download |
59
+ | thepiratebay | all | General torrent search |
60
+ | nyaa | anime, tv | Anime and Japanese media |
61
61
 
62
62
  **Examples:**
63
63
 
@@ -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;AAcpE,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAY3C,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"}
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"}
@@ -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
- eztv: eztv_1.default,
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
- nyaa: nyaa_1.default
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)(process.cwd(), 'sources.json');
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":";;;;;;AA8BA,8CAMC;AAED,8CAeC;AAED,0CAGC;AAED,oCAGC;AAED,wCAEC;AAnED,2BAA8C;AAC9C,+BAA4B;AAG5B,kDAA0B;AAC1B,oEAA4C;AAC5C,kEAA0C;AAC1C,wDAAgC;AAChC,sEAA8C;AAC9C,gEAAwC;AACxC,gEAAwC;AACxC,qDAA6B;AAC7B,oDAA4B;AAC5B,gDAAwB;AACxB,kDAA0B;AAE1B,MAAM,QAAQ,GAAkC;IAC9C,IAAI,EAAJ,cAAI;IACJ,aAAa,EAAb,uBAAa;IACb,YAAY,EAAZ,sBAAY;IACZ,OAAO,EAAP,iBAAO;IACP,cAAc,EAAd,wBAAc;IACd,WAAW,EAAX,qBAAW;IACX,WAAW,EAAX,qBAAW;IACX,OAAO,EAAE,gBAAM;IACf,KAAK,EAAL,eAAK;IACL,GAAG,EAAH,aAAG;IACH,IAAI,EAAJ,cAAI;CACL,CAAC;AAyCO,4BAAQ;AAvCjB,SAAgB,iBAAiB;IAC/B,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;IACxD,IAAI,IAAA,eAAU,EAAC,WAAW,CAAC,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE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AC1B,CAAC;AAED,SAAgB,cAAc;IAC5B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tor-dl",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "CLI torrent search tool - search, open in browser, copy magnet links",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/sources.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "hasMagnet": true
13
13
  },
14
14
  "torrentscsv": {
15
- "enabled": false,
15
+ "enabled": true,
16
16
  "name": "torrents-csv",
17
17
  "baseUrl": "https://torrents-csv.ml",
18
18
  "searchUrl": "https://torrents-csv.ml/api/search",
@@ -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
- eztv,
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
- nyaa
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(process.cwd(), 'sources.json');
21
+ const sourcesPath = join(__dirname, '../../sources.json');
33
22
  if (existsSync(sourcesPath)) {
34
23
  return JSON.parse(readFileSync(sourcesPath, 'utf-8'));
35
24
  }