colonelpanic8/okcupyd

Any way to tell a user you visited their profile?

Opened this issue · 14 comments

I didn't see a way to do this. I know this happens automatically for free accounts, but A-list members can browse anonymously and manually notify users that you visited their profiles. I guess a workaround for now is to just disable anonymous browsing.

This should be really easy to add. I'll try to squeeze it into a release sometime this week.

Completely unrelated: Have you had any difficulty logging with okcupyd? Some users have reported an issue recently.

Nope, it's been working fine. I just made a little wrapper script to activate the virtualenv and set the appropriate env vars before running my python script.

$ cat ./run.sh
#!/usr/bin/env bash

source ./bin/activate
export OKC_USERNAME='<username>'
export OKC_PASSWORD='<password>'
exec ./run.py

Thats good to hear. You should be aware that okcupid recently deleted all of my accounts (and those of the people with whom I share internet) and banned my ip address (and any ip address from which a login attempt to my address is made) from logging in to okcupid at all.

If you are doing things that could potentially make okcupid unhappy from an okcupid account that you care about, I would recommend that you use http://okcupyd.readthedocs.org/en/latest/public.html#okcupyd.profile_copy.Copy to backup your profile. You can also very easily do most okcupid access through a dummy account to avoid drawing attention to any accounts you care about.

Good to know. For what it's worth, I've just been doing searches and visiting profiles so far. I've also inserted a random 5-15 second delay between each request to avoid suspicion and/or flooding the servers.

Not sure if this helps, but A-list members get a little button that says "Let them know I visited." The HTML source looks like this:

<button class="flatbutton white" onclick="Profile.visit('<username>')"> Let them know I visited </button>

Clicking on it sends a POST to www.okcupid.com/profile with the following form data: ajax=1&u=<username>&tuid=<some digits>&stalk=1

yeah. this should be a feature that is super easy to add. I would encourage you to take a stab at it. The value for tuid is just the id attribute of the Profile object. Profile objects already have a requests session, so all you really need to do is something like

self._session.okc_post('profile', data={'ajax': 1, 'username': self.username, 'tuid': self.id, 'stalk': 1})

@mconigliaro /anyone else who is interested in this feature. Can you test https://github.com/IvanMalison/okcupyd/tree/stalk_profile to make sure it works? It would be super cool if you could also record the vcrpy cassette that is used in testing for the test_stalk test.

This should simply amount to putting your credentials in the file test_credentials.py, and then run inv r test_stalk. Obviously your credentials will be scrubbed from the recording. (the code that does this lives here: https://github.com/IvanMalison/okcupyd/blob/master/okcupyd_testing/util.py#L62)

I found that doing profile.gender() seems to create the request you desire (that is, appear in their visitor logs).

@chrism2671

  • Don't you mean profile.gender?
  • this will be true of any profile attribute, but only so long as invisible browsing is turned off. This is actually an unfortunate side effect of the way the libary works
  • @mconigliaro is asking for a way to do this when you have invisible browsing turned on.

Ah my mistake!

Out of curiosity, why is this 'unfortunate'?

Incidentally, have you been banned by OKC yet? Just trying to understand what suitably conservative behaviour is.

Out of curiosity, why is this 'unfortunate'?

@chrism2671 It's unfortunate because that it means that simply using this library with an unpaid account will result in lots of possibly unintended profile views. That is why i decided to delay the retrieval of profile information to the last possible moment.

Incidentally, have you been banned by OKC yet? Just trying to understand what suitably conservative behaviour is.

Yes, as I mentioned above, all of the accounts, as well as my home IP address have been banned from okcupid. The behavior of some of my accounts was highly irregular (beyond what most people would typically use this library for), and I imagine that simply using okcupyd to, for example, backup all of your messages or something like that will not incur okcupid's wrath. If you want to do stuff that involves on the order of 100s or 1000s of profiles/requests, I would advise some caution. Using the profile copy functionality is another thing that could get you banned.

@chrism2671if you could help test this feature I would really appreciate it. Do you have an a-list account?

Sorry for the delay, been on holiday! I don't have an A-list account at the moment, but I might sign up for one in due course.

In my script, that involves visiting a lot of profiles repeatedly, I inserted:

import random
import time
sleep_time = random.gauss(10,5)
time.sleep(sleep_time)

between requests, which seemed to keep okc happy (for now).

Good to know they've started banning accounts. I was using 2-4 second delays between requests to profiles. This is a good motivation for issue #44.