r/Python • u/backprop88 • Dec 19 '17
Automate the boring stuff with python - tinder
https://gfycat.com/PointlessSimplisticAmericanquarterhorse481
Dec 19 '17
Note: If you swipe right to all the people, the Tinder algorithm is going to deem you as 'desperate', and therefore, not very attractive. And it's going to lower your ranking so you'll get shown less and less to the most attractive people.
188
u/CSMastermind hobbist Dec 19 '17
I wouldn't be surprised if they do filter out rapid swiping like this but the algorithm I think you're talking about works a little differently. Tinder monitors your like to match ratio and filters your matches based on it. If you swipe right on everyone and nobody swipes right on you, you'll be shown (and shown to) less attractive people (people with lower ratios themselves). Until people eventually swipe right on you and your ratio goes up.
You also get better matches if you have a higher response rate to your messages and if the person you're messaging uses specific keywords like their phone number. The goal is to show you people of a similar attractiveness. All dating sites do something similar.
For best results infrequently swipe (once or twice a week), message everyone who you match with, and always try to get their contact information.
But mass right swiping isn't a problem per se if they all match you back.
41
Dec 19 '17
This ratio also influences the plus price
13
u/FoxFire64 Dec 19 '17
Wait what? Can you provide a source, because that’s fucked up.
16
u/averysillyman Dec 19 '17
I looked into it and I haven't been able to find an actual legit source that Tinder price discriminates based on how attractive you are. So that's probably not true.
What Tinder does do is price discriminate based on age and location. If you're older, you have to pay more. If you live in a country with a higher average income, you have to pay more. Depending on your location and age you pay anywhere between 3 to 30+ dollars for tinder plus, with 10 dollars being the most common price point.
20
u/eatsfooddrinkscoffee Dec 19 '17
Married guy here. People pay for Tinder??
21
u/DodgersOneLove Dec 19 '17
I have. Looked at it this way, costs me less than a drink at the bar for a month and it'll get me strange about once a month, so it's a win in my book. Buying let's you swipe unlimited times which ups the strange in my opinion
6
u/Luffydude Dec 19 '17
First of all tinder got me laid so much that I just thought I'd show them some love
I'm a Londoner, getting matches here is pretty hard because there are just so many dudes. Most of my matches are either super likes or the weekly boost.
Also the passport thing got me a full schedule of girls to meet on my Asia trip
4
u/averysillyman Dec 19 '17
Apparently.
The app itself is free but like with almost all free apps there are "perks" you can pay for.
2
u/why_rob_y Dec 19 '17
Some people also got grandfathered in at lower prices. I used to pay $2 per month, but forgot to change my CC info after there was (unrelated) fraud on my card. So, my account got terminated and my new price was $8 per month (even after explaining to customer support).
1
11
Dec 19 '17
Nobody really knows how it works, but likely both factors play in. Mass right swiping will penalize you, and so will being unattractive.
0
7
u/niksko Dec 19 '17
Is this based on anything, or are you just making assumptions? Not necessarily doubting you, I'm just curious as to your sources.
6
4
17
Dec 19 '17
add a section that swipes left every 8, 9 people.
56
u/GreyRobe Dec 19 '17
or just filter "princess", "feminist", "marriage", "married" in the bio and swipe left. Should be frequent enough to work.
61
u/WaningWaffle Dec 19 '17 edited Aug 11 '25
vast grab slim detail towering offer disarm truck nutty run
This post was mass deleted and anonymized with Redact
46
4
6
3
4
2
0
87
u/MethmaticalPhysics Dec 19 '17
Her: “so I’m curious, what made you swipe right?” Me: “My python” Her: “oh you’re python, well how big is it?” Me: “Let’s just say it’s way past 3.6”
4
59
u/Jigsus Dec 19 '17
Tinder has a web interface?
15
108
u/qrv3w Dec 19 '17 edited Dec 19 '17
You can also do this with an Android phone using the adb tool.
First download the android debug bridge. Then enable your phone to use adb.
Then plug in your phone and type into a terminal:
while true; \
do ./adb shell input touchscreen swipe 300 800 1000 800 100; \
sleep .$[ ( $RANDOM % 10 ) + 1 ]s; \
done;19
Dec 19 '17
why the
if 1 * 2 < 3?18
u/qrv3w Dec 19 '17
Haha I was having trouble making a code block so I copied the stuff from the Markdown primer (now edited out) :)
55
u/epiris Dec 19 '17
writes shell script to swipe like a boss; has trouble typing four spaces before each line in his code
23
u/semi- Dec 19 '17
tries to properly indent, somehow selects the next input box
4
1
Dec 19 '17
You say that but it's not following PEP8.
2
u/semi- Dec 19 '17
Whoops didn't realize what sub I was in, I am surprised I got so many upvotes from behind enemy lines
15
u/Theriley106 Dec 19 '17
I actually made a project a while ago that used Python with ADB to swipe left/right on Tinder depending on the amount of people in the photo.
I put up a tutorial on youtube and the project on Github.
3
3
u/Bitenieks Dec 19 '17
make web game bots too, shits pretty cool.
Or you can use this device: https://www.youtube.com/watch?v=snDeLy8cu24
1
91
u/da_intrepid_traveler Dec 19 '17
I went through some of the chapters of Automate the Boring Stuff, and I've always used Selenium for stuff like that. Is pyautogui better?
60
u/ManyInterests Python Discord Staff Dec 19 '17
Selenium is probably better for this case. It's directly aware of web elements and their attributes. With PyAutoGUI it would be harder to do things like reliable element detections and text extraction, for example.
44
u/stevarino Dec 19 '17
The web server could trivially detect selenium. This is clearly in violation of the site's TOS so you may not get far advertising so much.
Using a gui automation toolkit keeps the browser naive and therefore makes detection much harder.. Except for the 300 clicks per minute on the exact same pixel.
18
Dec 19 '17
Except for the 300 clicks per minute on the exact same pixel.
write in a few lines that changes the exact spot by a few turtle degrees to the left, up, right. Am I right?
7
u/ManyInterests Python Discord Staff Dec 19 '17 edited Dec 19 '17
The web server could trivially detect selenium
Simply untrue. It is certainly possible, but far from trivial and you would need some form of client-side code to do this. The web server otherwise has no way of knowing whether or not a browser is controlled by selenium, or even if requests were sent to the server by a browser at all... The client is in complete control of what is sent to the server. Further, because client-side code is able to be examined, controlled, and altered by the client, server-side methods are almost exclusively used. In practice, actual active client-side deterrents beyond, say, Google ReCaptcha are rarely, if ever, implemented on the client-side.
Instead, the most effective and commonly deployed detection methods (including methods used by ReCaptcha) are often heuristic in nature and look for bot-like behavior and activity from a server-side perspective, agnostic of what is actually controlling the behavior... And most sites don't even actively deter this. Automation experts merely need to make sure that communication with the server is indistinguishable from that of an ordinary client... which often doesn't even need a browser to begin with because the server doesn't care or know how it receives requests, only that they are well-formed and include the information expected.
Having done many projects in web automation, I can personally attest that there are very very very few cases where a tool like PyAutoGUI is the best choice for automating actions that take place in a browser. For whatever that is worth.
1
u/stevarino Dec 19 '17
Thanks for the comment, you're 100% right and didn't obsess about that "300 clicks per minute" jab I tacked on at the end like most replies did.
Selenium is a valid approach that I was probably too quick to dismiss. My original comment was that for this specific case (making us all laugh), the code OP provided met all the requirements at minimal cost.
The problem with selenium is that when you're in a situation that requires that level of camouflage, the server will likely utilize another method to counter it.
Selenium is a partial solution in an arms race.
I have a project that uses selenium against a public data source (government data) but they're using tech from companies who advertise they can stop selenium scrapers. We do get around it, but we all know that it will continue to cost time and money to work around but ultimately this will be solved through out-of-channel solutions (lawyer letters, friendly emails to build rapport, etc).
Given the arm's-race nature and the increased infrastructure costs selenium expects (system requirements are more than "click here") that's why I spoke against it.
8
Dec 19 '17
how do you know this stuff? a genuine question from super python newbie
0
Dec 19 '17
[deleted]
21
Dec 19 '17
Well, specifically basic web-programming experience. I'm sure there's quite a few embedded sensor programmers who haven't the slightest clue how the browser works, or that mouse tracking is even a thing.
0
3
u/jakibaki Dec 19 '17
Just fyi even by default selenium just uses the user-agent that the "host" browser uses. The other points about detecting selenium are obviously still valid.
2
u/ManyInterests Python Discord Staff Dec 19 '17
Selenium is a browser automation tool, not a browser itself. The user-agent is reported the same as when selenium is not in use... Strictly from a web server perspective, there is no indication of whether or not the browser is controlled by selenium.
2
u/pyfrag Dec 19 '17
Useragent is as easy to spoof as rewriting the header. Selenium no doubt supports this.
1
u/jyper Dec 19 '17
Selenium useragent would just be the useragent of the browser unless you're using phantomjs and since chrome and Firefox have headless mode now why would you
As for rate of clicks you can sleep just like with pyautogui
0
Dec 19 '17
[deleted]
14
u/Decency Dec 19 '17
Yeah, it almost certainly would. It's super trivial to spoof user agents to get around blocks that filter based on them.
2
u/MystTheReaper Dec 19 '17
Doesn't selenium let you run on different browsers too or am I misremembering?
4
u/theeastcoastwest Dec 19 '17
Yes it does. Firefox ships standard, but chromium ( at least ) can easily be used as simply as just specifying which driver to load. Thesyntax for options config is different, but interaction methods are identical I believe. PhantomJS integrates well also, though I've noticed it often produces errors/fails where other non-headless drivers do not.
→ More replies (1)1
1
1
u/CowboyBoats Dec 19 '17
To be fair they're probably neither storing nor examining which pixel of the Next button people click.
3
u/hugthemachines Dec 19 '17
"I really like the attributes of your web elements"
...tinder bot pick up line.
1
u/impshum x != y % z Dec 19 '17
My thoughts exactly. The ability to watch for elements and react is key.
5
u/jyper Dec 19 '17
Selenium is better for web stuff, pyautogui can automate non web stuff like desktop apps
19
u/stochastic_zeitgeist Dec 19 '17
I did the same thing using adb commands a couple of years ago. This was when there was no concept of Super Likes and daily swipe limits.
Surprisingly it worked pretty well then, because tinder was new and didn't restrict such "I lswipe right all behavior". These days profiles that swipe everyone right are ranked pretty low.
1
u/cringe_master_5000 Dec 19 '17
Did you get fuk?
3
62
u/indecisive_maybe Dec 19 '17
I just recreated this program! It never ends, though - do not recommend.
8
u/SponsoredByMLGMtnDew Dec 19 '17
https://youtu.be/dZLyfbSQPXI?t=1156
Watch that for about 1 minute. The guy who made it goes over the failsafe built into pyautogui
(move your mouse into the top left corner very fast and it raises an exception)
1
4
u/diybrad Dec 19 '17
Amateur, I reached the end of Tinder doing it manually. And I live in a major city.
1
1
1
Dec 19 '17
Pyautogui's failsafe terminates it if you slam the mouse to the top left of the screen.
1
u/indecisive_maybe Dec 19 '17 edited Dec 19 '17
I know that now, thanks. After I installed and immediately ran the program, I didn't have a chance to look at documentation. No combo of Ctrl+D, C, esc that work for Matlab worked here, but I found out opening task manager gave my mouse freedom until I made another window active, so I went from there.
0
0
Dec 19 '17
[deleted]
14
u/ColdPorridge Dec 19 '17
Better to make sleep time a non-uniform random range so you don't get your account banned for being a robosleeze
6
u/rowdyllama Dec 19 '17
I randomized all the time intervals and the pixel you click on. Rather than finding the coords of one point, find the coords of a box in the "like" button and it will randomly click a point in that box.
from pyautogui import position import time from random import randint from random import random upperLeft = list(position()) lowerRight = list(position()) while True: pauseMax = randint(90,110) pauseTime = randint(8,12) for item in range(0,pauseMax): r = random() x = randint(upperLeft[0],lowerRight[0]) y = randint(upperLeft[1],lowerRight[1]) pag.click(x,y) time.sleep(r) time.sleep(pauseTime)3
108
Dec 19 '17 edited Dec 19 '17
[removed] — view removed comment
13
u/badboybeyer Dec 19 '17
I think that library would make it difficult to send an interrupt to the terminal. It would keep putting focus on the window at x, y.
2
19
Dec 19 '17
[removed] — view removed comment
4
Dec 19 '17
Same as u/lookingforsome1
I know there are a lot of resources out there. But still I would like to listen to your guidance.
What are the real resources that apply to your job scope?
2
u/lookingforsome1 Dec 19 '17
favorite data science blog or learning resource?
3
u/PHILLY_G Dec 19 '17
More ML than general data science, but I actually really like kdnuggets for their short articles (good as both interest peaks and refreshers) and the kaggle community is great for competitions, kernels (like code snippets you can run in browser), and conversation.
12
8
u/alexandresalafia Dec 19 '17
I use the pyautogui to automate the login process on the system in wich I work. I like very much! It´s perfect to me.
ps. I´m from Brazil and I´m not english speaker! Sorry for any error
3
u/Lahusen Dec 19 '17
Nice work 👍🏼 Make a tutorial with pictures and stuff, share it on medium or a video on YouTube- maybe start a Podcast while you are at it!
1
5
5
5
u/Mentioned_Videos Dec 19 '17 edited Dec 19 '17
Videos in this thread: Watch Playlist ▶
| VIDEO | COMMENT |
|---|---|
| Al Sweigart, "Automating Your Browser and Desktop Apps", PyBay2016 | +70 - There's a link to a conference the guy who made/maintains the library gave on it. The first part is about test automation. The part i skipped to is where he talks about GUI automation. You can use it to make web game bots too, shits pretty cool. Per... |
| Creating a Tinder Bot with Python | +4 - I actually made a project a while ago that used Python with ADB to swipe left/right on Tinder depending on the amount of people in the photo. I put up a tutorial on youtube and the project on Github. |
| Money Can't Buy Me Tinder Matches - But a Slab of Meat Can | +1 - make web game bots too, shits pretty cool. Or you can use this device: |
| MEETING THE ENEMY A feminist comes to terms with the Men's Rights movement Cassie Jaye TEDxMarin | 0 - I wouldn't call that racism because "racism" implies something bad that I have control over, that I can deliberately decide to follow or not. I don't want to be put into the same box with nazis just because I have some cultural subconscious imprints ... |
| I'm a bot working hard to help Redditors find related videos to watch. I'll keep this updated as long as I can. |
2
4
u/NullTheFool Dec 19 '17
Could I train a machine learning model based on my swipes as to what kind of pictures I find attractive? I wonder what kind of horrifying image would come out when ran backwards (I don't know machine learning or the term for having it synthesize based on a model)
4
u/Stats_monkey Dec 19 '17
Theoretically you could, but you would require quite a large and diverse dataset of labelled images which could make the exercise prohibitive.
1
Dec 19 '17
For a lot of men at least that'd just involve a a quick scrape of PornHub and a couple search terms.
7
u/Stats_monkey Dec 19 '17
Perhaps. Machine learning can be a trixy business though. Images taken from a porn site are fundermentally different to tinder pics when it comes to lighting, framing, clothing ect. Training with images from a different domain can be problematic.
1
2
u/SashimiJones Dec 19 '17
Tinder already has this. I live in Asia and exclusively date local girls, so it only shows me those girls. Only about 5% of my cards are foreign girls, and they're guaranteed to have already swiped right on me. I've seen other guy's tinder results here and they have a far higher ratio of foreign to local. If tinder is sorting on that kind of basis it's almost certainly doing it for other factors too.
1
Dec 19 '17
You could just scrape Google image searches for “beautiful women” and “ugly women.” Then train your classifier based off of that. I don’t know whether scraping google is that easy, though.
4
10
3
u/yawnful Dec 19 '17
GUI automation is the least reliable form of automation but it is also the easiest for newcomers to understand and to do. I would encourage people to try GUI automation first but to then move on to using APIs.
7
u/nullseccarebear Dec 19 '17
I use keyboard macros for gaming that have a similar end-result.
14
u/monkJs Dec 19 '17
"I don't know what's better, getting laid or getting paid I just know when I'm getting one, the other's getting away This way"
Keep up the grind my dude.
2
2
2
2
2
2
2
2
2
1
1
1
1
1
u/turtlebait2 Dec 19 '17
This is very cool and i just tried it out, but it doesn't seem to like multiple monitors.
1
1
1
1
u/Divided_Eye Dec 19 '17
Can anyone tell me what this is accomplishing (in the gif)? Just clicking through pictures?
Also, "till a baby" is a terrible username for a dating site IMO.
1
1
1
1
1
1
1
u/Speedracer98 Dec 19 '17
i guess this would work if your goal was to match with a python chat bot
or ugly chicks.
-3
u/FL4D Dec 19 '17
Wow, I'm a bit shocked to see this type of post here. And some of the comments... Yikes!
0
0
Dec 19 '17
Lol I’m confused why did he pick tinder to demo that? It’s just clicking on the like button right ?
1
Dec 19 '17
It's a joke. It's not a very original joke -- did the same thing like a decade ago with HotOrNot -- but it's a joke.
-1
Dec 19 '17
That is great, awesome library tip.
But I have to mention that if you google you'll find services that let you mass swipe people on tinder. I've never used them, might be phishing. But I have seen them.
828
u/kkjdroid Dec 19 '17
Now you need machine learning to determine the attractiveness of the picture.