Replaced Snoowrap with public API calls in response to Reddit revoking API keys. This was largely done using Claude Code, extensive manual review and major version bump needed if merged into main.
This commit is contained in:
@@ -77,14 +77,20 @@ module.exports = {
|
||||
interval: 100,
|
||||
},
|
||||
reddit: {
|
||||
api: {
|
||||
userAgent: 'ripunzel',
|
||||
clientId: '1234567abcdefg',
|
||||
access_token: 'abcD123eFg45Hi6J7klmnop8qr9',
|
||||
token_type: 'bearer',
|
||||
expires_in: 3600,
|
||||
refresh_token: '1234567-A-Bc-defg8912hij-klm345opqr',
|
||||
scope: 'history identity mysubreddits read subscribe',
|
||||
// Netscape/Mozilla cookie-jar dump (string) of a logged-in reddit session, used to
|
||||
// get past reddit's anonymous-traffic bot challenge on www.reddit.com. Needs periodic
|
||||
// refreshing - src/reddit/client.js logs a warning once the soonest-expiring cookie
|
||||
// in here is within 48h of expiring.
|
||||
cookies: null,
|
||||
// fallback/simpler alternative to `cookies` above: a single pre-built `name=value; ...`
|
||||
// Cookie header string. Only used if `cookies` is not set.
|
||||
cookie: null,
|
||||
userAgent: 'ripunzel',
|
||||
throttle: {
|
||||
// deliberately conservative - this is unauthenticated-looking public access,
|
||||
// not an approved API key, getting flagged as a bot defeats the point
|
||||
reservoir: 6,
|
||||
minTime: 1500,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user