Code Monkey home page Code Monkey logo

reddit's People

Contributors

aaronhall avatar anlsh avatar bboe avatar billywm avatar chizu avatar dahlia avatar damgaard avatar deimos avatar epsy avatar fluxflashor avatar foxx avatar hazimgazov avatar jensechu avatar jknabl avatar julian avatar mdippery avatar nemec avatar paul-nechifor avatar pinkerton avatar rasher avatar renfredxh avatar sente avatar shalecraig avatar shrayasr avatar simongreenhill avatar tailszefox avatar tmelz avatar tomdunn avatar voussoir avatar wiwiweb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reddit's Issues

ReplyBot

I'm fairly new to using GitHub, so I didn't know where else to put this.

I would like to change the ReplyBot to only reply to people in the KEYAUTHORS section as opposed to blacklisting them. How would I go about doing this?

Is there automated reddit poster bot ?

Hi, I see u did alot of work with all ur bots. It's little bit hard for me to find trough all, so if u can point me is there any reddit poster bot ?

What I mean is to pick up some source like xml, rss feed, json , and post from it ?

Peace,

All to Any

https://github.com/voussoir/reddit/blob/master/ReplyBot/replybot.py#L82

Hi

Instead of checking all are not equal, you can check any are equal. It should be more understandable then.

        if KEYAUTHORS != [] and all(auth.lower() != pauthor for auth in KEYAUTHORS):
            # This post was not made by a keyauthor
            continue

like

not any(auth.lower() == pauthor for auth in KEYAUTHORS)

IMPORTANT

You also need to .lower() on the RHS as follows

not any(auth.lower() == pauthor.lower() for auth in KEYAUTHORS)

as reddit returns in caps sometimes.

timesearch.py - get_all_posts(), lower=upper when too few results are found

Hello,

first of all, thank you for sharing your code, it has helped me a lot to build my own reddit bot.

https://github.com/voussoir/reddit/blob/master/Prawtimestamps/timesearch.py#L307

Now on the issue I've found, I've taken the get_all_posts() function to use it in my own code and I've noticed that when too few results are found, the lower variable gets assigned the value of the upper, when it should stay the same and recheck with a higher upper limit.

If the first if is true, then the second is false and the code inside else gets executed, changing the value of lower, when it should stay the same.

if itemsfound < 75:
    ...
if itemsfound > 99:
    ...
else:
    lower = upper
    ...

Here's the correction I've applied:

if (itemsfound < 75):
    print('Too few results, increasing interval', end='')            
    diff = 2 - (itemsfound / 75)
    diff = min(MAXIMUM_EXPANSION_MULTIPLIER, diff)
    interval = int(interval * diff)
elif (itemsfound > 99):
    print('Too many results, reducing interval', end='')
    interval = int(interval * (0.8 - (0.05 * toomany_inarow)))
    toomany_inarow += 1
else:    
    lower = upper
    toomany_inarow = max(0, toomany_inarow-1)
    smartinsert(sql, cur, searchresults)

upper = lower + interval

existence of any more historical data on subscribers?

I tried to find contact info for you, but came up empty, my apologies. This is not a problem with the repo.

I'm working on a project where the data you collected and released on subscriber counts over time has been extremely useful. I've got the sqlite databases from all of the releases, but I was wondering whether you might have more measurements lying around. I only need the subreddit name/id, subscriber count, and the date it was collected. Any other data, even if it's not complete, would be very helpful- a part of what I'm working on is looking at the patterns in time of the growth in communities by various metrics. To that end, having as many repeated measures for a subreddit as possible is helpful.

Another related question is whether you would be interested in the dataset I derive from your releases- I have a postgres table collating the subscriber counts over time from each release. I'd be happy to provide a sql dump or sqlite db file and with a little bit of work I could clean up my python code to generate that db given a set of dbs from your code, so that anyone with that data could reproduce it.

Thanks for making this available, it's been a huge help. If you'd prefer to discuss via email I can get you mine.

Replybot goofs up when the SQL database has over 200 entries

So, the function that's supposed to clean up the old values from the SQL database actually seems to be removing everything after 200. Meaning that the 201th post will receive an insane number of replies from the bot, with it posting once every 10 cycles.

"'Reddit' object has no attribute 'submit'"

Fixed this by modifying lines 79-82 in the bot file to comply with PRAW 4.

if text is not None:
   newpost = r.subreddit(member[1]).submit(title, selftext=text, resubmit=True, send_replies=True)
if url is not None:
   newpost = r.subreddit(member[1]).submit(title, url=url, resubmit=True, send_replies=True)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.