itsmartin / redditstorybot Goto Github PK
View Code? Open in Web Editor NEWRedditStoryBot is a simple PRAW-based bot to link to a submitter's past content on Reddit posts.
License: MIT License
RedditStoryBot is a simple PRAW-based bot to link to a submitter's past content on Reddit posts.
License: MIT License
Some users have a lot of posts, which can result in the list getting quite long.
Example for /r/gametales
[USER] has posted their first Game Tale! In celebration of this once-in-a-lifetime event, they win a fabulous prize of [RANDOM PRIZE]!*
*In accordance with the nature of this subreddit, prize offered is 100% fictional.
a chrome toaster
a brand new washing machine
a speedboat
a microwave oven
a state-of-the-art hi-fi system
a home computer
a cassette deck
a VCR
an all-inclusive trip for two to Paris
an Austin Allegro
a weekend in Blackpool
a teasmade
a carriage clock
a 14 inch portable television set
a hamburger-shaped telephone
a set of gold coloured biros
a set of travel luggage
a trouser press
a Wedgewood dinner service
a set of Encyclopedias
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "RedditStoryBot.py", line 209, in <module>
RedditStoryBot().main()
File "RedditStoryBot.py", line 67, in main
self.log.error("HTTP error occurred: " + err.reason)
AttributeError: 'HTTPError' object has no attribute 'reason'
sys:1: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('178.62.62.232', 35796), raddr=('198.41.209.140', 80)>
/usr/lib/python3.4/importlib/_bootstrap.py:2127: ImportWarning: sys.meta_path is empty
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=6, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('178.62.62.232', 56694), raddr=('198.41.209.140', 443)>
Crashed, restarting
Traceback (most recent call last):
File "RedditStoryBot.py", line 209, in <module>
RedditStoryBot().main()
File "RedditStoryBot.py", line 16, in __init__
self._initReddit()
File "RedditStoryBot.py", line 56, in _initReddit
self.reddit.login(config.username,config.password)
File "/usr/local/lib/python3.4/dist-packages/praw-2.1.20-py3.4.egg/praw/__init__.py", line 1330, in login
self.request_json(self.config['login'], data=data)
File "/usr/local/lib/python3.4/dist-packages/praw-2.1.20-py3.4.egg/praw/decorators.py", line 163, in wrapped
return_value = function(reddit_session, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/praw-2.1.20-py3.4.egg/praw/__init__.py", line 557, in request_json
retry_on_error=retry_on_error)
File "/usr/local/lib/python3.4/dist-packages/praw-2.1.20-py3.4.egg/praw/__init__.py", line 399, in _request
_raise_response_exceptions(response)
File "/usr/local/lib/python3.4/dist-packages/praw-2.1.20-py3.4.egg/praw/internal.py", line 178, in _raise_response_exceptions
response.raise_for_status()
File "/usr/local/lib/python3.4/dist-packages/requests-2.5.1-py3.4.egg/requests/models.py", line 831, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable
This is a reddit bug that we can't fix, but the bot needs to stop responding to these users, or have an alternative response.
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.