Craigslist spam buttons script updated

Tonight I published an update to my Craigslist Spam Buttons greasemonkey script. (If you don’t know what this is about, see my earlier post). I’ve had some feedback on the script, and I was able to incorporate those requests. Now the [spam] buttons are displayed at the front of item link. And when you click on the link, a request is made in the background to mark the item as spam. You no longer have to jump to the flag-spam page, then click the continue browsing button to get back to where you were. Instead the [spam] button changes to a red check mark to indicate that it has been marked.

This is more difficult than you would think, you can’t just do a simple AJAX request because your browser will only make requests to the same site you are on. In this case you are browsing on yourcity.craigslist.org, but the flag-spam page is on flag.craigslist.org.

The greasemonkey extension does provide a built in method to make http calls to external sites, but that would break my Opera compatibility. So instead I load the flag-spam page as the src of a JavaScript-created image object.

It was fun to figure out, I really enjoy programming in JavaScript.

You can get the script from userscripts.org. Here is a screen shot:

Craigslist spam buttons, v1.1

28 Responses to “Craigslist spam buttons script updated”

  1. Rob Says:

    Do you know how a single person can flag ads repeatedly? CL say’s it’s difficult but I think it must be fairly simple.

  2. aj Says:

    Please help. All I get is the html script. what do i do?

  3. aj Says:

    i sue this to flag: http://www.craigsflagger.com/

  4. aj Says:

    I use n sue sorry about that: http://www.craigsflagger.com/

  5. aj Says:

    Rob, I want to figure that out too. How does one single person so quickly flag so many. Anyone?

  6. noname Says:

    you don’t need to flag more than once. other people are flagging while you flag. the spams go down fast.

  7. noname Says:

    uber fantastic. will try. i was conceptualizing a proxo filter (or pair), but decided i should google for prior art. here that is.

    suggest: flag based on search (this tool) only when you’re sure the post is spam. if you search precisely for certain bulkspam, every link on the results will be obviously spam.
    the “website” link above is a good test. that spammer posts about 30 per day, everyday.
    flag strategy is to flag newer ads, and let the old ads expire. the old spam gets pushed back (by legitimate ads) and also provide evidence of spamming pattern.

  8. noname Says:

    sometimes breaks. i think when craigs includes message: “The following common or short search terms were skipped:”
    your link doesn’t show because your link placement still depends on html structure?

    script works for similar search, removed common word “our”:
    http://newyork.craigslist.org/search/sks?query=%22Check+out%22+Refrences+Pics

    otherwise, in opera, your link opens craigs “thanks” page.
    so easiest “manual batch” usage is to middle click your [spam] links (each “thanks” page opens in background), then middle click those background tabs to close.

  9. Dave Says:

    This is a great script. There is a community of craigslist flaggers whose work would be made much more efficient by this. I’m new to that community, so I don’t know whether some of them already use it (they’re a pretty closed-mouth bunch). So I posted a link to your page on their forum.

    One thought, there are also Miscategorized and Prohibited flags which need to be used often in flagging ads that are in violation of the craigslist terms of use. Could your script be modified to access those flags too? You could use 3 smaller links in sequence like [s] [m] [p] in front of the ad link, so you wouldn’t blow out the links page layout.

    Thank you.

  10. Dave Says:

    BTW, when working a list of search results to target a spammer, you can tell by the color of the link whether you’ve already visited the ad to flag it, even if you reload the search page. However, with this script the red check mark disappears when you redo the search, so unless you write it down, you can’t tell where to pick up your work. Is it possible for the script to show the link as visited, or retain the red check mark?

    Thanks.

  11. someone Says:

    The flagging site above: http://www.craigsflagger.com/

    doesn’t work–unfortunately.

  12. George Says:

    Works great, thanks!

  13. Art Says:

    does not work for me

  14. Art Says:

    can’t get it to remove any post.

  15. Ryan Stille Says:

    Hi Art. I think you are misunderstanding how Craigslist flagging works. Flagging a message will not immediately cause it to be removed. Craigslist has some kind of algorithm, that may be a just a count of flags, or so many flags in a certain time period, etc. Once their magic algorithm is satisfied, the post is removed.

    If a single flag caused a posting to be removed - there wouldn’t be any posts! :-)

  16. Ryan Stille Says:

    @Dave - yes I’d like to make it remember which posts you’ve flagged, but thats a big step up in terms of programming complexity. I may get to it someday…

  17. Dave Says:

    Ryan, thanks for the response. There’s actually a fairly easy workaround to remembering which posts you’ve flagged. When you flag the most recent spam on a particular list, click its link to open the ad and the browser will remember it as visited.

    A more productive use of your programming time IMO would be the ability to flag miscategorized and prohibited ads in addition to spam.

  18. no-name Says:

    All flag links do the same thing, no need to add miscategorized and prohibited.

  19. Dan Says:

    It’s a great idea … although it appears the script isn’t working. I tried flagging using the script, the ad didn’t go down when refreshed, but when flagged using the link on the ad’s page, it worked and the ad registered as flagged. I don’t think it was a fluke due to someone else flagging because this is on the pennstate.craigslist site which doesn’t have many people flagging, and I retried the flagging within 3 seconds. There are spams that have gone a week or more without being flagged down on this site, so don’t tell me ‘it’s just been flagged by someone else’.

    I don’t think the spam script is flagging ads properly… try it on one of the smaller sites and see. Flag the ad using the script, refresh the ad’s page. Flag the ad using the links on the ad page, refresh. If it says ‘this ad has been flagged’ the second time but not the first, unless someone else flagged in the 5 seconds it took you to reflag, the script doesn’t work and we’re all wasting our time flagging with it :/

    But thanks for the great idea! I hope it can be updated to actually work.

  20. Ryan Stille Says:

    Dan, I’m not sure why you think its not working. If you right click on my [spam] link, copy the URL, then manually paste it in to your URL bar, you’ll see that you are presented with a “thank you for flagging” page. Thats the URL your browser is requesting when you click on the [spam] link.

    And if craigslist does set any kind of cookie when flagging (which I can find no evidence of), it would get set just fine by the [spam] link, its just a regular http request.

    You say when you clicked on the spam link on the actual listing page “it worked and the ad registered as flagged”. But if you hit refresh in your browser you will see that all goes away and you have the spam/miscategorized/etc links shown again. So if you are expecting to see the “thanks for flagging” message there instead of the links after clicking the my [spam] on the listing page, thats not how it works.

  21. Paul Says:

    The Craig’s List system has several variables:

    - it tracks a flag request per IP and URL - hence, making the attempt to re-flag an already flagged post useless. Once the request has already been made for a specific ad per the URL and your IP where the flag request came from, you’re wasting your time trying to reflag it - multiple attempts are simply discarded.

    - it has a queue depth that Craig’s List itself assigns based on activity and feedback per category in any given city. If more people send feedback saying there’s a massive problem then typically they’ll lower the queue depth, also known as the flagging threshold. When it’s lowered, it requires a smaller amount of total flags (they’re all unique, as I explained above) to have an ad removed.

    - flagged ads, ones that exceed the flagging threshold for a given category/city, don’t disappear automagically as most people SHOULD UNDERSTAND by now. So that means when you load up Firefox with Ryan’s wonderful script and you click that (spam) link the script creates, it won’t do you any good to reload the page once, twice, or fifteen times - the ad will not disappear instantly. It takes time, and that time is where all the other flags come into play because they are all needed to exceed the flagging threshold that actually causes an ad to be flagged down. But even when that happens, it takes Craig’s Lists servers time to actually remove the ad, could be 1 minute, could be 30 but sooner or later it will disappear AS LONG AS the flagging threshold was exceeded.

    - Ryan’s script does exactly - EXACTLY - what happens when you formally load an ad and then click the Spam/Overpost link on the Craig’s List ad page. Same exact thing happens: a flag request is sent to Craig’s Lists servers and your IP is matched to the URL and bound together in the queue waiting for more until the flags in the queue exceeds the flag threshold. When that happens, bam… flagged down.

    These days I’d have to say the Las Vegas Computer category is the absolute worst on any Craig’s List site anywhere I’ve been looking. We have some real no-life low-life scumbucket using some type of software to automagically just post spam ads for pirated Adobe/Microsoft software and other crap 24/7 these days. I just went through an entire page of 100 ads by hitting the (spam) link that Ryan’s script provides - 10 minutes later about 70 of them were gone, quickly replaced by a few more but different ones based on time of posting.

    His script works, it’s just that most people don’t comprehend how the flagging system works. Load the script, when you find a spam ad, click (spam) and forget about it. You can even watch your cable or DSL modem or network card activity monitor and see a data burst from your machine over the connection when you click that link as the flag request is sent out.

    And I thank Ryan for the script as I’m a geek and I find a lot of great deals on Craig’s List so I make it a point to flag this idiot spammer constantly when I see his spam posted. This script just makes it that much easier, although what I really want is an automagic method, seriously. Something that I can input the repetitive terms the spammer uses and it just autoflags the crap down for me/us.

    It’s pretty bad in the Vegas Computer category - in a normal 24 hour period this idiot has been known to post 6000 or more ads, all done automagically.

    CL could “fix” this quick by changing the method for CAPTCHA, but they won’t do it for some reason. Guess they prefer the dumbed down method of “authentication” to post an ad even when it’s costing them massive bandwidth for no good reason with each spam posting we find.

  22. Dan Says:

    Tried to post this comment before, dunno why it didn’t post. First of all, great script. Thanks for making it.

    It still doesn’t appear to work for me, though.

    The Pennstate.craigslist.org list is low-traffic. Sometimes spam job ads stay up for more than a week. If I take one of those ads which has probably already been flagged once or twice, hit ’spam’ next to the title, then click on the ad, it loads normally. I reload to make sure it’s not cached, it loads normally. Then I click the ‘real’ spam/overpost flag link, get the thankyou, reload, and the ad is marked ‘flagged for deletion.’

    Now unless someone else decided to flag again, just in the 5 seconds it took for me to get into the ad and hit the real ‘flag’ link, when the ad’s been up for weeks already, the script’s not working :( . And yes, it’s happened a lot… they must have some change to the flag process that doesn’t let the script work (if they did it to actually disable the script, that’s absolute idiocy, because CL is overrun with spam!)

    Anyway, thanks for the help, and the script. I hope it notifies me via email when a followup is posted this time!

  23. Ryan Stille Says:

    You are right Dan, I was able to replicate the behavior you described. CL must be doing something… possibly checking the referring URL on the flag requests. It didn’t seem to work when I just copied the flag link and pasted it into my browser. I got the thanks for flagging page, but the ad didn’t go down. When I actually clicked on the flag link, I got the same page but when I went back and refreshed the ad it was down. The only difference I can think of between those two methods is that the referring URL will only be sent when I click the link.

    I’ll have to give some thought to that, it looks like there is a way to make a request and set the referring URL, but its going to break Opera compatibility.

  24. Dan Says:

    Thanks for the reply, Ryan! Appreciate the help on the script. CL needs all the help it can get to stem the neverending tide of spam. I know they’re probably trying to avoid the spammers’ marking everyone else’s ads as spam except their own (hey, when you’re pure evil, you’ll stop at nothing to make sure you win and everyone else loses)… but I think it’s outweighed by letting users mark spam more easily.

    Thanks for making it easier to fight spammers… though ‘as long as there is evil in the hearts of men,’ I’m sure they’ll be around ;) . At least we make it more difficult for them to do their spamming.

  25. israel Says:

    What is the most current auto flagger for craigslist and how do you use it?

  26. Nathan Says:

    This doesn’t seem to be working. I loaded the scrip I open CL I hit the SPAM button and the listing hasn’t gone down over an hour. I copy the link to the browser and get the thanks for flagging page but again the listing never goes down. Any ideas? The pet section in Boise is ridiculous with people posting things that should not be there. Am i missing something do i need to clear cache and keep hitting spam button? Please let me know.

    This doesn’t work either http://www.craigsflagger.com/

  27. sayonarra Says:

    need help understanding a flagged post mine. the post was over 2 days (48 hours old) when it was flagged. 1st time i got flagged, felt weird! anyway, as it had been over 2 days old, i figured id try repost ad as technically 48 hours had past since it was originally posted. i eliminated wording that might caused flag. so i go ahead enter the text box to post and i get message saying i over limited my posting limits. ok. then i hit back button browser and dialog asked me if i wanted post data redone. i say yes entered new captua word , wording to enter form and repost was successful that time! id like understand why doing post data cleared over limit on my posts??!!
    i have also noted cl categories and posting limits goo by city/region. if you post say san francisco/nob hill, then you can post a different ad say in sanfrancisco height, it seems definer category is default what definition subclass of region. any enlightenment most welcome sayonarra

  28. Sean Says:

    How to avoid being flagged on craigslist. Tired of getting flagged? Tired of all the worthless bored losers in the world who have appointed themselves the censors of craigslist and choose to flag your post over and over again until it disappears? Well I think I have figured out how the algorithm works!! I believe it works on the times your ad is accessed total versus the times it is accessed and flagged. So in order to keep your ad from getting flagged just wait until it posts then click on it, then click the back arrow on your browser and click on it again. Do this as many times as you feel is necessary. I usually do it about 100-200 times. This takes a lot of time but if you want to keep your ad posted it is worth it!! Eventually all of these bored losers with nothing better to do give up and find somebody else’s ad to pick on.

    And for all you flagging losers with nothing better to do, I know how you can flag the same ad over and over again without even exiting Craigslist!! But guess what, I am not going to tell you!!

    If You Flag You Should Get A Life!!

Leave a Reply