From 53da7045d923a7339ff5443724f6c8a3abbdb9cd Mon Sep 17 00:00:00 2001 From: Laszlo Zeke Date: Thu, 20 Jul 2017 11:40:32 +0200 Subject: [PATCH] Limiting feed to the newest 5 items instead of 10 GAE started counting UrlFetches to the free quota of incoming bandwith and this made the app go over it's daily limit. Limited to only 50% should be able to keep it under limit but users may miss some new content if they arrive in burst or clients don't update frequently. --- TwitchRSS/twitchrss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TwitchRSS/twitchrss.py b/TwitchRSS/twitchrss.py index bd82df5..efd91a6 100644 --- a/TwitchRSS/twitchrss.py +++ b/TwitchRSS/twitchrss.py @@ -27,7 +27,7 @@ from app_id import TWITCH_CLIENT_ID VODCACHE_PREFIX = 'vodcache' USERIDCACHE_PREFIX = 'userid' -VOD_URL_TEMPLATE = 'https://api.twitch.tv/kraken/channels/%s/videos?broadcast_type=archive,highlight,upload' +VOD_URL_TEMPLATE = 'https://api.twitch.tv/kraken/channels/%s/videos?broadcast_type=archive,highlight,upload&limit=5' USERID_URL_TEMPLATE = 'https://api.twitch.tv/kraken/users?login=%s' VODCACHE_LIFETIME = 120 USERIDCACHE_LIFETIME = 0 # No expire