shantnu / redditbot Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I tried the code and I get the following error.
dan@wiggy:~/RedditBot$ python3 bot_read.py Traceback (most recent call last): File "bot_read.py", line 8, in <module> for submission in subreddit.hot(limit=5): File "/home/dan/.local/lib/python3.5/site-packages/praw/models/listing/generator.py", line 52, in __next__ self._next_batch() File "/home/dan/.local/lib/python3.5/site-packages/praw/models/listing/generator.py", line 62, in _next_batch self._listing = self._reddit.get(self.url, params=self.params) File "/home/dan/.local/lib/python3.5/site-packages/praw/reddit.py", line 391, in get data = self.request('GET', path, params=params) File "/home/dan/.local/lib/python3.5/site-packages/praw/reddit.py", line 506, in request params=params) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/sessions.py", line 185, in request params=params, url=url) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/sessions.py", line 116, in _request_with_retries data, files, json, method, params, retries, url) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/sessions.py", line 101, in _make_request params=params) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/rate_limit.py", line 35, in call kwargs['headers'] = set_header_callback() File "/home/dan/.local/lib/python3.5/site-packages/prawcore/sessions.py", line 145, in _set_header_callback self._authorizer.refresh() File "/home/dan/.local/lib/python3.5/site-packages/prawcore/auth.py", line 328, in refresh password=self._password) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/auth.py", line 138, in _request_token response = self._authenticator._post(url, **data) File "/home/dan/.local/lib/python3.5/site-packages/prawcore/auth.py", line 31, in _post raise ResponseException(response) prawcore.exceptions.ResponseException: received 401 HTTP response
Traceback (most recent call last):
File "C:/Users/B/PycharmProjects/RedditBot/RedditBot1.py", line 8, in
for submission in subreddit.hot(limit=5):
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\praw\models\listing\generator.py", line 61, in next
self._next_batch()
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\praw\models\listing\generator.py", line 71, in _next_batch
self._listing = self._reddit.get(self.url, params=self.params)
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\praw\reddit.py", line 454, in get
data = self.request("GET", path, params=params)
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\praw\reddit.py", line 626, in request
return self._core.request(
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\sessions.py", line 183, in request
return self._request_with_retries(
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\sessions.py", line 115, in _request_with_retries
response, saved_exception = self._make_request(
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\sessions.py", line 98, in _make_request
response = self._rate_limiter.call(
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\rate_limit.py", line 35, in call
kwargs['headers'] = set_header_callback()
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\sessions.py", line 145, in _set_header_callback
self._authorizer.refresh()
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\auth.py", line 327, in refresh
self._request_token(grant_type='password', username=self._username,
File "C:\Users\B\PycharmProjects\RedditBot\venv\lib\site-packages\prawcore\auth.py", line 141, in _request_token
raise OAuthException(response, payload['error'],
prawcore.exceptions.OAuthException: invalid_grant error processing request
Process finished with exit code 1
You are the only one bot in python really working and comment to a post thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.