I made a stupid thing to click the meh. button automagically like a dirty cheater.
27I was thinking about all the complaints surrounding the calendar, and for the millionth time I considered automating my way around the click.
Today I remembered that @shawn did this a while back, and it got me thinking…
… a little while later, I made this, the meh botton!
So what is it exactly?
It’s a thing, that will click the meh. button for you at a fixed interval (default is every two hours, user configurable). It’s all docker’d up and ready for your delectable deployment.
Deployment?
Oh yes my friend… I took something easy and made it unnecessarily complicated. It will run great in docker. It will run great in k8s. It will even run in an ARM environment!
How?
Well, first I took the nice easy code written before, and I gutted it of it’s nifty Dash Button magic. It just clicks.
Then I started wrapping it up in a container. Rather than do something obvious like have it run as a service I opted to go the stupid hard route of using cron. Don’t do this.
Dissatisfied with this, I then added some fancy Docker Hub hooks to also make it build nice for my BeagleBones. (Hint: it runs like crap)
Finally, I even wrote a bit of documentation for anyone else silly enough to run this. Check it out in my git repo.
Bonus:
A picture of my lil’ cluster, because I think it’s fun
- 11 comments, 42 replies
- Comment
OK, that’s cool. Got any hobbies??
BTW I love the term automagically and am always surprised when people don’t understand it’s meaning!
@chienfou Me too! I feel it’s a really good descriptor too. Usually when I say it aloud it’s accompanied by nebulous hand waving
/giphy robert-downey-jr-whatever-black-waving
@hanzov69 perfect giphy!
Over the years I have used it a lot and some of the instruction sets I have made for spreadsheets with auto fill date fields refer to that process.
@chienfou it may or may not have taken me like 20 edits to get the gif I wanted…
@hanzov69 been there done that, done that, done that etc. etc.
@chienfou @hanzov69 tonight I got fed up cycling through edits over and over to get the giphy I wanted, so I finally learned how to just go directly to giphy to find the gif I want and paste it in directly.
Once you’ve searched for the perfect gif on giphy, go to the source page, such as:
https://giphy.com/gifs/paleycenter-3o6ZtkTtNTSngwbh1m
…then click on the “Copy Link” button. From the the popup menu, select “GIF Link”, and…
voila!
@hanzov69 @UncleVinny very cool.
Congratulations? While I thought, perhaps, since I recognized words here and there that this was in English, after reading this and clicking on your links I am pretty positive I do not speak Geek and google translate is of no help
Checking the site and clicking every 2 hours though is hilarious since screwing up the stats of site visits, if mediocre cares about that, is down right devious.
For your next unintended consequence, what happens during events like we just had. If your program is busy trying to click on the face button and you are busy trying to click on buy an irk does (a) the world explode, (b) the mediocrebot have a melt down, © you find that now you have to click on bicycles, stairs, bridges, stores and streetlights before you can buy a irk (d) you crash the site or (e) you have no clue - be adventurous?
Seriously though I am surprised it took someone 5 years to get around to doing this as I know others have talked about it.
/image FIRST! Award
@Kidsandliz haha, thanks. My intent wasn’t to screw with traffic metrics. Once every two hours is way more aggressive than it needs to be, but that extra 5 visits a day doesn’t seem likely to skew things tooooo much.
While it would be awesome if an unintended consequence would be causing a sweet ass 500 error, site explosion, or (less awesome) blocking an IRK… it shouldn’t do any of those things. That I’m aware of, spinning up a new session shouldn’t do anything to invalidate an existing session held elsewhere, so the IRK chase is safe.
That can’t possibly be right, right? Surely this can’t be the first auto-clicker thingy out there.
HIKING! VIKINGS! STRIKE KING [BRAND FISHING LURES]! AWESOME!
@hanzov69 There was the
modificationbastardization of a physical amazon order button but you still had to mechanically click (someone posted in that thread to bring it up). I think you are the first one to have it auto do it without any need to do anything other than to have your computer on. At least that is how I read it - all you have to do is have your computer on. Right?@hanzov69 @Kidsandliz
Second, I did it a long time ago
@lichme - sorry about that. I didn’t remember.
/giphy then you were first!
@lichme I give up on giphy
@lichme ha, of course it was you that did it first, that makes total sense! Also, I forgot all about the mehtrix
Up next: Meh.com puts in a CAPTCHA to click the meh button.
I installed CAPTCHA to save my fellow robots from wasting money on this crap.
@therealjrn … you know, I was taking a look at unCaptcha earlier today…
http://uncaptcha.cs.umd.edu/
@hanzov69 @therealjrn
@therealjrn
/image catcaptcha
@narfcake It’s a CATCHA!
@narfcake @therealjrn There are only 3 letters there.
@ELUNO @therealjrn Details, details.
@narfcake I feel like I would fail this every time.
VAC banned
@ThomasF bwahahaah. If Meh is VAC…does that make Woot PunkBuster?
Most of this thread makes no sense to me, but I still find it oddly hilarious.
What would be even more hilarious is if Meh waits until many, many Mehtizens start using automated button clicker software, and then (just for a day or two) swaps the Meh and Buy buttons…
@shahnm haha, unfortunately I don’t think that would be good enough to trick people in to buying. But looking at the docs for Nightmare has given me some interesting ideas. Like automatically buying anything under a certain dollar amount. IRKs would fail due to the forced You-Know-Whatcha, but everything else could be automated.
Would be funny to just have random meh garbage show up
@hanzov69 OMG, this is herculean.
My observation from (ignorantly) reading through the code is that it doesn’t seem especially fault-tolerant.
Some ideas:
Am I missing a few things in your code?
The docker/kubernetes stuff is amazeballs, btw.
@UncleVinny Thanks!
It’s extremely not fault tolerant. Credit where it’s due, I didn’t write any of the browser automation stuff.
I took a look and when you click the meh button it does add a class to the div, changing it from
<div class="meh-button flip-container
to<div class="meh-button flip-container flip
.Based on tonights page, it looks like that
flip
class is only used once. If I were to change the flow of the automation to always login first, then check for the existence of theflip
class, I could ensure that it’s only trying to click it once a day. Tradeoff is it’s still logging in every time to check.Useful error reporting/telemetry in general is totally missing. I left the screenshot stuff in because my original intent was to do the bare minimum to get it working in the most convoluted way.
An interesting way to record successes and build a personal “calendar” would be to extend that click logic, and if
.flip
exists, then grab the image url from.back
and update a dumb page.In that case I would really scale it a bit and move away from the unnecessarily complex cron system to just a running service, presenting a page out with
http
. I could switch the scheduling to something likenode-schedule
and have it just constantly running.Buuuuut all that feels a lot like adding a level of maturity and polish to a dumb toy, which is a lot less hack-y. And who has time for all that?
Thanks for the compliments! It was fun and earnestly hope no one actually tries to use it for anything
@hanzov69 @UncleVinny I have no idea what the heck you are talking about but if you can figure out how to trick the meh homepage into always showing one’s click record even if you don’t have 7 days in a row that would be cool.
@hanzov69 ah yeah, I doubt anyone would want to load on a lot of features… but since my background is in QA, I can’t help it.
@UncleVinny bwahaha, you’re my favorite people. I’m DevOps and Chief Obstacle for Release. I have uttered “has QA signed off on it” more times than I can count!
Nicely done.
/giphy applause
@joelmw thank you thank you
Kewl! Now, I just noticed the calendar documenting my Meh button (non-)clicks no longer shows up on the front page.
WTH???
@richrauch Oh boy… I don’t know how to break it to you… But the Calendar is
brokendifferent@richrauch buckle up and get ready for the rabbit trail that will lead to disappointment.
Noticed that this broke a few days ago, went to check it tonight and figure out WTF was happening.
Now we have a captcha on the login page too?
Geez.
@mrchristian Beep boop. Spammer block?
@therealjrn I mean, I know why it’s there. But now I have to remember to click every day and it makes me sad.
@mrchristian @therealjrn does it have to log in fresh every day?
@RiotDemon It (by which I broadly mean an auto-meh bot) might not. Nightmare is primarily meant as an automated site testing tool, so its easiest use in this case is to simulate logging in each time it runs. I’m not deeply familiar with the library, but I have its docs pulled up now and I expect it has at least some means of passing in a cookie with the requests it makes.
I expect this’d mean you would need to do a little more manual setup the first time (basically, grab the cookie that Meh sets for your session when you log in, paste it into a file or environment variable that Nightmare can access, and send it in), but with some more hacking I think it could still work.
@mrchristian
So that’s why I can’t login anymore from my computer. I was wondering what happened. Stupid captcha.
As a fellow robot, I understand your pain.
@mediocrebot
No, mediocrebot, I don’t think you do.
@lljk @RiotDemon @mrchristian @cf1
Isn’t this a simple as popping a url via cURL (with whatever credentials or cookies needed)?
@lljk @RiotDemon I’m not saying that I didn’t briefly consider taking this to an extreme and adding a deathbycaptcha hook to it… but that feels like too much work
@mike808 The meh face URL is a POST request to https://meh.com/deals/[DEAL NAME]/vote. The URL with the deal name is easy enough to pull from the Meh API, but the mildly tricky part is that there’s a cross-site request forgery token in the meh face input form. Since the server presumably rejects inputs sent without the CSRF token that it expects, you’d need to load up the deal page and scrape that token if you want to do it that way.
@lljk OK, so two cURL commands.
One to get the CSRF token and the other to “push” the button.
@mrchristian I hacked together a dirty fix where you can put your cookie data in as an environment variable, but that only works for a while and is subject to break if there is anything that invalidates your session along the way.
I need to think through a better way to skin this cat long term, because I’m lazy.
I also am a dirty rotten cheater. Welome