kerray / reddittotwitterandfacebook Goto Github PK
View Code? Open in Web Editor NEWPython script to watch submissions in a subreddit and if they pass criteria, repost them to a Facebook Page and Twitter
License: GNU General Public License v3.0
Python script to watch submissions in a subreddit and if they pass criteria, repost them to a Facebook Page and Twitter
License: GNU General Public License v3.0
it should be possible to filter which comments will be reposted based on author, upvotes, approved status, keywords...
it could be possible to keep the hierarchy by also keeping track of comments and linking/replying to each other
so that they can be later deleted or commented on Facebok/Twitter
I try to run your script, and I got received 500 HTTP response and others error. I try to use both python (2 and 3) also trying on both OS (CentOS 7.6 and Windows 10), but problem still not solved.
Here's is the error:
Python2:
Traceback (most recent call last):
File "main.py", line 176, in <module>
validate_and_repost_submissions()
File "main.py", line 124, in validate_and_repost_submissions
for submission in reddit.subreddit(reddit_subreddit_name).new(limit=reddit_post_limit):
File "/usr/lib/python2.7/site-packages/praw/models/listing/generator.py", line 81, in next
return self.__next__()
File "/usr/lib/python2.7/site-packages/praw/models/listing/generator.py", line 52, in __next__
self._next_batch()
File "/usr/lib/python2.7/site-packages/praw/models/listing/generator.py", line 62, in _next_batch
self._listing = self._reddit.get(self.url, params=self.params)
File "/usr/lib/python2.7/site-packages/praw/reddit.py", line 442, in get
data = self.request("GET", path, params=params)
File "/usr/lib/python2.7/site-packages/praw/reddit.py", line 577, in request
method, path, data=data, files=files, params=params
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 185, in request
params=params, url=url)
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 128, in _request_with_retries
retries, saved_exception, url)
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 94, in _do_retry
params=params, url=url, retries=retries - 1)
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 128, in _request_with_retries
retries, saved_exception, url)
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 94, in _do_retry
params=params, url=url, retries=retries - 1)
File "/usr/lib/python2.7/site-packages/prawcore/sessions.py", line 130, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.ServerError: received 500 HTTP response
Python3:
Traceback (most recent call last):
File "main.py", line 176, in <module>
validate_and_repost_submissions()
File "main.py", line 124, in validate_and_repost_submissions
for submission in reddit.subreddit(reddit_subreddit_name).new(limit=reddit_post_limit):
File "/usr/local/lib/python3.6/site-packages/praw/models/listing/generator.py", line 52, in __next__
self._next_batch()
File "/usr/local/lib/python3.6/site-packages/praw/models/listing/generator.py", line 62, in _next_batch
self._listing = self._reddit.get(self.url, params=self.params)
File "/usr/local/lib/python3.6/site-packages/praw/reddit.py", line 442, in get
data = self.request("GET", path, params=params)
File "/usr/local/lib/python3.6/site-packages/praw/reddit.py", line 577, in request
method, path, data=data, files=files, params=params
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 185, in request
params=params, url=url)
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 128, in _request_with_retries
retries, saved_exception, url)
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 94, in _do_retry
params=params, url=url, retries=retries - 1)
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 128, in _request_with_retries
retries, saved_exception, url)
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 94, in _do_retry
params=params, url=url, retries=retries - 1)
File "/usr/local/lib/python3.6/site-packages/prawcore/sessions.py", line 130, in _request_with_retries
raise self.STATUS_EXCEPTIONS[response.status_code](response)
prawcore.exceptions.ServerError: received 500 HTTP response
Anyway, thankyou for making this script.
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.