pynder icon indicating copy to clipboard operation
pynder copied to clipboard

Interested_in field profile -> How to update?

Open DylanVanAssche opened this issue 9 years ago • 4 comments

Hi,

I'm trying to update my profile field: interested_in. As I saw in the Pynder code that it uses a converter for the gender:

  • 0: male
  • 1: female

So if I write this: session.profile.interested_in = "male" The profile should be updated to 'interested in male'?

I tried that but when I run this: session.profile.interested_in it stays on female... Or should I call a function to updates those values in Python?

Dylan

DylanVanAssche avatar Mar 28 '16 18:03 DylanVanAssche

Hi,

I got the same problem and tried

session.update_profile({
            "gender_filter": 1,
            "age_filter_min": 18,
            "age_filter_max": 1000,
            "distance_filter": 160
        })

This is working fine for me.

timavo avatar Apr 18 '16 06:04 timavo

@timavo how does it accept max 1000 and distance 160? That's not even allowed in the actual app.

ghost avatar Apr 24 '16 16:04 ghost

I tried it but it's buggy. Sometimes it updates and sometimes it doesn't... @halalfood I don't think that works...

DylanVanAssche avatar Apr 28 '16 18:04 DylanVanAssche

Pynder Version: 0.0.13

Setting "interested_in" is confirmed working at 5th July 2017 using the code below, you must set both "interested_in" and "gender_filter" attributes:

session.update_profile({
    "interested_in": [0, 1],  # [0,1] for both genders, [0] for male, [1] for female.
    "gender_filter": -1  # -1 for both genders, 0 for male, 1 for female
})

There is indeed a bug in the code in me.py, InterestedInDescriptor.set function. I think GenderDescriptor also has the same problem. For now, you'll have to write the JSON data like above and send it using session.update_profile() as a workaround.

RailKill avatar Jul 04 '17 16:07 RailKill