Added support for RedGifs and Reddit albums. Improved command line logger. Added rate limiters for reddit and host URLs.

This commit is contained in:
2024-09-11 05:16:58 +02:00
parent bb06fe9763
commit de50d609f3
33 changed files with 586 additions and 256 deletions
+16
View File
@@ -6,6 +6,22 @@ const yargs = require('yargs');
function getArgs() {
const args = yargs
.command('npm start -- --user <username>')
.option('log-level', {
alias: 'level',
describe: 'CLI log verbosity',
type: 'string',
default: config.logger.level,
})
.option('interval', {
describe: 'Minimum wait time between HTTP requests',
type: 'number',
default: config.limiter.interval,
})
.option('concurrency', {
describe: 'Maximum HTTP requests pending at the same time',
type: 'number',
default: config.limiter.concurrency,
})
.option('users', {
alias: 'user',
describe: 'Reddit usernames to fetch posts from',