|
|
@ -11,7 +11,7 @@ from datetime import datetime, timedelta
|
|
|
|
|
|
|
|
|
|
|
|
import praw
|
|
|
|
import praw
|
|
|
|
from praw.errors import InvalidUser, InvalidUserPass, RateLimitExceeded, \
|
|
|
|
from praw.errors import InvalidUser, InvalidUserPass, RateLimitExceeded, \
|
|
|
|
HTTPException
|
|
|
|
HTTPException, OAuthAppRequired
|
|
|
|
from praw.objects import Comment, Submission
|
|
|
|
from praw.objects import Comment, Submission
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
@ -78,7 +78,7 @@ def login(user=None, password=None):
|
|
|
|
r.refresh_access_information()
|
|
|
|
r.refresh_access_information()
|
|
|
|
if verbose:
|
|
|
|
if verbose:
|
|
|
|
print("Logged in with OAuth.")
|
|
|
|
print("Logged in with OAuth.")
|
|
|
|
except HTTPException:
|
|
|
|
except (HTTPException, OAuthAppRequired) as e:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
if user and password:
|
|
|
|
if user and password:
|
|
|
|
r.login(_user, _pass)
|
|
|
|
r.login(_user, _pass)
|
|
|
|