Merge branch 'master' into themes
This commit is contained in:
@@ -38,6 +38,7 @@ from .config import Config, copy_default_config, copy_default_mailcap
|
||||
from .theme import Theme
|
||||
from .oauth import OAuthHelper
|
||||
from .terminal import Terminal
|
||||
from .content import RequestHeaderRateLimiter
|
||||
from .objects import curses_session, patch_webbrowser
|
||||
from .subreddit_page import SubredditPage
|
||||
from .exceptions import ConfigError
|
||||
@@ -189,7 +190,13 @@ def main():
|
||||
with term.loader('Initializing', catch_exception=False):
|
||||
reddit = praw.Reddit(user_agent=user_agent,
|
||||
decode_html_entities=False,
|
||||
disable_update_check=True)
|
||||
disable_update_check=True,
|
||||
handler=RequestHeaderRateLimiter())
|
||||
|
||||
# Dial the request cache up from 30 seconds to 5 minutes
|
||||
# I'm trying this out to make navigation back and forth
|
||||
# between pages quicker, it may still need to be fine tuned.
|
||||
reddit.config.api_request_delay = 300
|
||||
|
||||
# Authorize on launch if the refresh token is present
|
||||
oauth = OAuthHelper(reddit, term, config)
|
||||
|
||||
Reference in New Issue
Block a user