Comments (3)
I'd love to take a crack at this. It's 24 days old, but I'm assuming there has been no progress on the bug?
from oc-bot.
Took a peak at it today. While there are major issues with all of the code that I think warrants a rewrite, here would be some code that looks suspicious to me, and is likely to be the cause. (i haven't tested this)
The key symptom here is the following:
"Author's Citations" links to a different comment (from the OP) every time. This is undesirable since it throws off the actual author's citations.
comments = [comment for comment in [item for item in reddit.redditor(self.author).new(limit=100) if str(type(item)) == "<class 'praw.models.reddit.comment.Comment'>"] if comment.submission == self.submission]
This filters the submissions locally. This means if an author has recent items elsewhere, the following scenario could happen.
-
Author has 90 recent submissions unrelated to the OC submission. Author's 90-100th submissions are all in the relevant OC submission (their first comment linking to data, as well as them responding to other users).
-
The OP makes another post, knocking their current 100th's item out of their most recent 100. This 100th item was also the comment with citations. This means that to the bot, out of the most recent 100 it is given, the "oldest" comment is now the previously 99th item. The bot will then process the following line
if self.check_database(oldest.id) is not True:
and proceed because it wasn't previously in the database. You probably don't see this bug very often because submissions will naturally die out and drop out of HOT 100 before a user has a chance to rack up 100 recent combined comments/submissions, but the more prolific users could definitely trigger this.
from oc-bot.
Fantastic. I was wondering what was going on.
I've been working on Version 2.0, which I will be uploading shortly. This all has to do with the fact that it's searching for the oldest comment, and logging that comment individually. All I have to do to prevent this bug log the submission.
Also, the entire thing will be reworked shortly. But if this bug crops up with the new version, we'll know what to do.
from oc-bot.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oc-bot.