Questions tagged [reddit]
Reddit, pronounced as "red-it," is a social news ranking website. This tag is NOT for support questions about using the Reddit website.
39
questions
3
votes
1
answer
35
views
Open the best Reddit posts with Nim
I wanted to try out the Nim language so I wrote a simple program to retrieve the top \$n\$ messages on a given subreddit in a given time frame and open them in the default browser.
I would really ...
1
vote
1
answer
207
views
Find Reddit comments with a particular keyword
I am writing a loop (in R) to webscrape Reddit posts - using Reddit's API ("Pushshift").
Essentially, I would like to get every comment that contains the word "Trump" between now ...
0
votes
1
answer
63
views
Content aggregator with Python
I am trying to build a personal content aggregator and I started off with Reddit.
My aim is to build something that is designed properly for this task so that I could add more sources and delivery ...
6
votes
1
answer
151
views
Reply bot for reddit. Simple bot that replies when "doctor" is mentioned
My bot is fully functional and I would love some feedback. Thanks!
Main loop for keep it running (main.py)
...
3
votes
1
answer
116
views
Reddit bot in Python
I have created a Reddit bot that goes through an "x" amount of posts. For each post it pulls all the comments from that post into a list then a data frame and then it loops over a CSV look ...
5
votes
1
answer
109
views
Reddit Hangman Bot Python3
Back with another Reddit bot. This one provides games of Hangman to an arbitrary number of players simultaneously. Users interface with the bot by mentioning it for a new game. Once that game is ...
4
votes
1
answer
127
views
Reddit Dictionary Bot Python 3
This bot uses the PRAW package and jisho.org API. While running, it looks at recent comments for summons. A user either requests a random Chinese character/Kanji and associated definitions or ...
3
votes
1
answer
149
views
Reddit Challenge #383 Python
I've completed the Reddit challenge #383.
Please find a a summary of the challenge and the test cases below:
Reddit Challenge #383 Necklace Matching
challenge:
In this challenge, we ...
5
votes
1
answer
192
views
Reddit Challenge #380 Python
I'm completed the Reddit challenge #380 (source).
Here is an abbreviated description:
Normally [in Morse code], you would indicate where one letter ends and the next begins, for instance with a space ...
5
votes
1
answer
87
views
Searching all new Reddit comments for comments matching regular expressions and notify of matches
This program constantly sends an https request to Reddit's API for new comments.
Using a PostgreSQL Database containing Regular Expressions, find comments of interest and notify about them using faye....
5
votes
1
answer
1k
views
Script to download images from Reddit
I wrote this script to download images from Reddit. I would like to hear from others on how can I improve this script.
...
4
votes
1
answer
69
views
Twitter bot to post game of thrones memes
I created a twitter bot, that can parse a subreddit and post content from there to Twitter. I am running this bot using a cron-job, which starts the app using ...
0
votes
1
answer
228
views
Saving Reddit posts and comments from JSON into ArrayLists
I'm trying to get and save in an ArrayList Reddit posts and comments.
The code is very similar for both:
The RedditThing is a parent of RedditPost and RedditComment:
...
6
votes
1
answer
137
views
A suicide prevention Redditbot
I have written a Reddit bot in Python (code below). Open to any improvements, especially on efficiency, as I am using PythonAnywhere to run it.
The main function is to scan posts in reddit and when ...
5
votes
0
answers
1k
views
Downloading images from Reddit using Python 3
I have been working on this small project in order to fetch top-notch images from Reddit. Overall I am pretty confident about the code below but I am not entirely sure about whether my error handling ...
4
votes
1
answer
100
views
Solution to Dummy Packet Assembler (Task from r/dailyprogrammer)
I tried to solve the Packet Assembler task posted at r/dailyprogrammer.
The Question is this:
When a message is transmitted over the internet, it is split into multiple packets, each packet is ...
2
votes
1
answer
471
views
Scrape a reddit post submission for comments and save comments to JSON file (revised)
This is the revised code after incorporating the suggestions from user Roman Susi.
Link to the previous post here.
Notable edits: I have factored out the bigger functions into smaller tasks. The ...
4
votes
1
answer
964
views
Scrape a reddit post submission for comments and save comments to JSON file
Edit: For a revision to this code according to the comments, see here: "here."
In regards to the code involving shortlinks and ...
2
votes
1
answer
129
views
Extracting top subreddits from an HTML table
I'm scraping a table and am trying to get nested td tags down the tbody tree but the code seems kind of verbose. Is there a more Pythonic way to do this?
...
7
votes
2
answers
3k
views
Replacing specific words in text with words from another list python
I've written a short script to use Reddit's PRAW API to search a subreddit for articles and if certain word/words are in the article title, replace those words with a random word taken from a list of ...
4
votes
1
answer
638
views
Javascript Reddit Bot
Some days ago I've written JavaScript bot for reddit. All it does is replacing not well-formatted gfycat URLs. I would love to hear feedback about this code!
...
4
votes
1
answer
223
views
Script to summarize Reddit posts over the past month
This script is meant to do the tedious work involved in a monthly event I run on a subreddit. It does a search for all posts relevant to the event since the last posting, and creates the bulk of the ...
3
votes
1
answer
98
views
Parse entries from a Reddit post
This is part of a program I'm working on to help me manage an event in a subreddit I'm involved with. The snippet here parses a post and returns the relevant information.
I think I'm most interested ...
6
votes
1
answer
313
views
subreddit image bot
I wrote a bot in python 3 using PRAW, requests, and BeautifulSoup that downloads a specified amount of image posts from a specified subreddit.
One limitation is that it can only parse the direct ...
2
votes
1
answer
1k
views
6
votes
1
answer
221
views
Reddit bot that posts text messages to subreddit
This is the first program I've ever made in Python, and I never really studied the language (just looked at bits of code online) so I'm sure the performance is less than optimal.
The Objective: At my ...
3
votes
1
answer
256
views
8
votes
1
answer
205
views
Chrome extension that marks Reddit entries with clickbait sources
So, I've created my first Chrome extension! What this does is it highlights every post on Reddit that comes from a source of dubious quality. It provides a few sources by default and allows the user ...
5
votes
1
answer
267
views
Newest Reddit submissions grabber
My program does exactly what I want it to do and it works well. However, I feel like it's very clunky.
I'd like my code to be more efficient. By that I mean, I'd like it to accomplish what it already ...
3
votes
1
answer
704
views
Reddit account creator
I'm trying to make a program that will create an account on Reddit using an HttpWebRequest. I ONLY want it to do that. (I don't care about it storing a cookie or ...
7
votes
1
answer
1k
views
Reddit bot to check reposts
I am a moderator of /r/sweepstakes on Reddit, which lets users post their referral links to contests/sweepstakes. One main rule is that a user is not allowed to post their link to a contest, if ...
2
votes
0
answers
295
views
OAuth2 Client for Reddit, written using Tornado
I have a written some code which helps me to get OAuth Access Code from Reddit. Reddit uses standard OAuth2, so like any other OAuther server, here's are the steps to perform:
The client/app sends ...
8
votes
1
answer
1k
views
Reddit-scraping API bot
I would like to improve my Reddit-scraping code to make it faster, but I don't know how. I am using deque instead of list to ...
3
votes
1
answer
521
views
Web-scraping Reddit Bot
I have been working on a web-scraping Reddit bot in Python 2.7 with the premise of going to /r/eve (a game sub-reddit) finding posts that contain a link to a website hosting killmail information (...
1
vote
1
answer
766
views
Saving comments and submissions from Reddit using Elasticsearch
I wrote a script to save comments and submissions from Reddit using Elasticsearch. Is there any way to improve the speed of inserting new items into Elasticsearch?
...
9
votes
1
answer
2k
views
Using Reddit API in R
I'm scraping some comments from Reddit using Reddit JSON API and R. Since the data does not have a flat structure, extracting it is a little tricky, but I've found a way.
To give you a flavour of ...
7
votes
1
answer
575
views
Reddit RepostFinder Bot
I've been making a bot for Reddit that finds reposts (based on image MD5 comparing) and posts a small comment on the thread (that part will be later, right now it downloads images and compares MD5). ...
1
vote
1
answer
110
views
Reddit Investigator-like JS app
I am building a one-page JS app similar to redditinvestigator.com, and my goal is for it to be 100% done in JavaScript. Coming from a PHP/Java background, I'm more used to working in class oriented ...
3
votes
2
answers
3k
views
Download image links posted to reddit.com
This is a Python script to save imgur pictures posted to reddit.com forums. I'm looking for an assessment on the design of this script and any web security issues that might exist.
Obvious ...