-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathm2t.js
139 lines (136 loc) · 5.83 KB
/
m2t.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// 磁力链提取元数据中的标题,项目地址https://github.com/Tsuk1ko/magnet2torrent-js
const { writeFileSync } = require('fs');
const Magnet2torrent = require('magnet2torrent-js');
var args = process.argv.splice(2)
// 可以自定义trackers
const trackers = [
'udp://tracker.opentrackr.org:1337/announce',
'http://tracker.opentrackr.org:1337/announce',
'udp://tracker.openbittorrent.com:6969/announce',
'http://tracker.openbittorrent.com:80/announce',
'udp://opentracker.i2p.rocks:6969/announce',
'https://opentracker.i2p.rocks:443/announce',
'http://opentracker.i2p.rocks:6969/announce',
'udp://www.torrent.eu.org:451/announce',
'udp://tracker.torrent.eu.org:451/announce',
'udp://open.stealth.si:80/announce',
'udp://exodus.desync.com:6969/announce',
'udp://9.rarbg.com:2810/announce',
'udp://ipv4.tracker.harry.lu:80/announce',
'udp://tracker.tiny-vps.com:6969/announce',
'udp://tracker.dler.org:6969/announce',
'udp://explodie.org:6969/announce',
'http://tracker.dler.org:6969/announce',
'udp://tracker.moeking.me:6969/announce',
'udp://tracker2.dler.org:80/announce',
'udp://tracker1.bt.moack.co.kr:80/announce',
'udp://tracker.zerobytes.xyz:1337/announce',
'udp://tracker.zemoj.com:6969/announce',
'udp://tracker.theoks.net:6969/announce',
'udp://tracker.skyts.net:6969/announce',
'udp://tracker.monitorit4.me:6969/announce',
'udp://tracker.loadbt.com:6969/announce',
'udp://tracker.lelux.fi:6969/announce',
'udp://tracker.jordan.im:6969/announce',
'udp://tracker.filemail.com:6969/announce',
'udp://tracker.bitsearch.to:1337/announce',
'udp://tracker.auctor.tv:6969/announce',
'udp://tracker.altrosky.nl:6969/announce',
'udp://tracker.0x.tf:6969/announce',
'udp://tracker-udp.gbitt.info:80/announce',
'udp://tr.cili001.com:8070/announce',
'udp://torrentclub.space:6969/announce',
'udp://public.tracker.vraphim.com:6969/announce',
'udp://public.publictracker.xyz:6969/announce',
'udp://mts.tvbit.co:6969/announce',
'udp://movies.zsw.ca:6969/announce',
'udp://inferno.demonoid.is:3391/announce',
'udp://fe.dealclub.de:6969/announce',
'udp://engplus.ru:6969/announce',
'udp://cutiegirl.ru:6969/announce',
'udp://camera.lei001.com:6969/announce',
'udp://bubu.mapfactor.com:6969/announce',
'udp://bt2.archive.org:6969/announce',
'udp://bt1.archive.org:6969/announce',
'udp://bt.oiyo.tk:6969/announce',
'udp://admin.videoenpoche.info:6969/announce',
'udp://abufinzio.monocul.us:6969/announce',
'udp://6ahddutb1ucc3cp.ru:6969/announce',
'https://tracker.nanoha.org:443/announce',
'https://tracker.lilithraws.org:443/announce',
'https://tracker.iriseden.fr:443/announce',
'https://tr.torland.ga:443/announce',
'http://vps02.net.orel.ru:80/announce',
'http://tracker2.dler.org:80/announce',
'http://tracker1.bt.moack.co.kr:80/announce',
'http://tracker.zerobytes.xyz:1337/announce',
'http://tracker.skyts.net:6969/announce',
'http://tracker.nucozer-tracker.ml:2710/announce',
'http://tracker.mywaifu.best:6969/announce',
'http://tracker.loadbt.com:6969/announce',
'http://tracker.lelux.fi:80/announce',
'http://tracker.hiyj.cn:80/announce',
'http://tracker.gbitt.info:80/announce',
'http://tracker.files.fm:6969/announce',
'http://tracker.corpscorp.online:80/announce',
'http://tracker.bt4g.com:2095/announce',
'http://tr.cili001.com:8070/announce',
'http://torrenttracker.nwc.acsalaska.net:6969/announce',
'http://t.overflow.biz:6969/announce',
'http://t.nyaatracker.com:80/announce',
'http://retracker.joxnet.ru:80/announce',
'http://open.acgtracker.com:1096/announce',
'http://open.acgnxtracker.com:80/announce',
'http://home.yxgz.vip:6969/announce',
'http://fxtt.ru:80/announce',
'http://btracker.top:11451/announce',
'http://bt.okmp3.ru:2710/announce',
'udp://vibe.sleepyinternetfun.xyz:1738/announce',
'udp://u4.trakx.crim.ist:1337/announce',
'udp://tracker.merded.xyz:8000/announce',
'udp://tracker.loligirl.cn:1337/announce',
'udp://tracker.leech.ie:1337/announce',
'udp://tracker.fatkhoala.org:13710/announce',
'udp://tracker.edkj.club:6969/announce',
'udp://tracker.ddunlimited.net:6969/announce',
'udp://tracker.babico.name.tr:8000/announce',
'udp://tr.bangumi.moe:6969/announce',
'udp://open.tracker.ink:6969/announce',
'udp://leet-tracker.moe:38151/announce',
'udp://leet-tracker.moe:23861/announce',
'udp://concen.org:6969/announce',
'udp://bclearning.top:6969/announce',
'https://tracker.yarr.pt:443/announce',
'https://tracker.nitrix.me:443/announce',
'https://tracker.kuroy.me:443/announce',
'https://tracker.babico.name.tr:443/announce',
'https://tr.ready4.icu:443/announce',
'https://tr.highstar.shop:443/announce',
'https://tr.fuckbitcoin.xyz:443/announce',
'https://tr.doogh.club:443/announce',
'https://tr.burnabyhighstar.com:443/announce',
'https://tr.abirxo.cf:443/announce',
'https://tr.abir.ga:443/announce',
'https://tr.abiir.top:443/announce',
'https://opentracker.cc:443/announce',
'https://abir0dev.github.io:443/announce',
'https://1337.abcvg.info:443/announce',
'http://tracker.merded.xyz:8000/announce',
'http://t.acg.rip:6699/announce',
'http://open.tracker.ink:6969/announce',
'http://fosstorrents.com:6969/announce',
'http://1337.abcvg.info:80/announce'
]
const m2t = new Magnet2torrent({
trackers,
addTrackersToTorrent: true,
timeout: 60
});
m2t.getTorrent(args[0]).then(torrent => {
// writeFileSync(`${torrent.name}.torrent`, torrent.toTorrentFile());
console.log('The torrent name=>:',torrent.name);
}).catch(e => {
// Timeout or error occured
console.log('timeout or check your magnet pls');
// console.error(e);
});