Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Typically. For example, on reddit you can run this in console to downvote everything on a comment thread:

$.each($(".down.arrow"), function(index, vote){ $(vote).click(); });



This won't down vote everything. Votes get throttled, so I guess a setTimeout has to be used.


They also explicitly state that you are to make no more than 30 requests/minute[1], or restated, no more than once every 2 seconds.

1. https://github.com/reddit/reddit/wiki/API


That's for the API. I don't think the official web site counts.


They also mention Greasemonkey scripts, which is functionally the same as running script from your console, so I believe it'd still apply.

Either way, it's probably a good guide to follow if nothing else -- I mean, reddit still has near-daily capacity issues.


Just curious, is there any reason you used `$.each` instead of `$(".down.arrow").each`?


Protip: you don't even need an each() at all[1].

So the above could be written:

$(".down.arrow").click();

1. http://jsfiddle.net/k6FvQ/


seems like the more functional-style way of doing it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: