mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[scraper] reduce seeders update delay and use mostly udp trackers
This commit is contained in:
@@ -8,9 +8,9 @@ const { Type } = require('./types');
|
||||
const { isVideo, isSubtitle } = require('./extension');
|
||||
const { cacheTrackers } = require('./cache');
|
||||
|
||||
const TRACKERS_URL = 'https://ngosang.github.io/trackerslist/trackers_all.txt';
|
||||
const TRACKERS_URL = 'https://ngosang.github.io/trackerslist/trackers_all_udp.txt';
|
||||
const MAX_PEER_CONNECTIONS = process.env.MAX_PEER_CONNECTIONS || 20;
|
||||
const SEEDS_CHECK_TIMEOUT = 30 * 1000; // 30 secs
|
||||
const SEEDS_CHECK_TIMEOUT = 20 * 1000; // 30 secs
|
||||
const ADDITIONAL_TRACKERS = [
|
||||
'http://tracker.trackerfix.com:80/announce',
|
||||
'udp://9.rarbg.me:2780',
|
||||
@@ -18,8 +18,8 @@ const ADDITIONAL_TRACKERS = [
|
||||
];
|
||||
const ANIME_TRACKERS = [
|
||||
"http://nyaa.tracker.wf:7777/announce",
|
||||
"http://anidex.moe:6969/announce",
|
||||
"http://tracker.anirena.com:80/announce",
|
||||
"udp://anidex.moe:6969/announce",
|
||||
"udp://tracker-udp.anirena.com:80/announce",
|
||||
"udp://tracker.uw0.xyz:6969/announce"
|
||||
];
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ const { delay } = require('../lib/promises')
|
||||
const { updateCurrentSeeders } = require('../lib/torrent')
|
||||
const { updateTorrentSeeders } = require('../lib/torrentEntries')
|
||||
|
||||
const DELAY_MS = 15 * 1000; // 15 seconds
|
||||
const DELAY_MS = 0; // 0 seconds
|
||||
const updateLimiter = new Bottleneck({ maxConcurrent: 5 });
|
||||
const statistics = {};
|
||||
|
||||
function scheduleUpdateSeeders() {
|
||||
console.log('Starting seeders update...')
|
||||
return repository.getUpdateSeedersTorrents(50)
|
||||
return repository.getUpdateSeedersTorrents(100)
|
||||
.then(torrents => updateCurrentSeeders(torrents))
|
||||
.then(updatedTorrents => Promise.all(
|
||||
updatedTorrents.map(updated => updateLimiter.schedule(() => updateTorrentSeeders(updated)))))
|
||||
|
||||
Reference in New Issue
Block a user