colonelpanic8 / okcupyd

A Library that enables programmatic interaction with okcupid.com, using okcupid.com's private okcupid JSON API and html scraping when necessary.
MIT License
110 stars 18 forks source link

Can't delete messages #86

Open joh1686 opened 8 years ago

joh1686 commented 8 years ago

Hi, maybe I got something wrong but I am not able to delete messages:

user.inbox[0].delete() Traceback (most recent call last): File "", line 1, in File "okcupyd/messaging.py", line 329, in delete return self.delete_threads(self._session, [self.id]) File "okcupyd/messaging.py", line 199, in delete_threads params=data, data=data) File "okcupyd/session.py", line 134, in okc_method response.raise_for_status() File "/usr/local/lib/python2.7/dist-packages/requests-2.10.0-py2.7.egg/requests/models.py", line 844, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: for url: https://www.okcupid.com/apitun/messages/threads?access_token=ACCESS_TOKEN&threadids=%5B%225582183714523483063%22%5D

colonelpanic8 commented 8 years ago

hah, yeah this has been popping up all over the place.

Seems like okcupid.com rehauled their private api.

joh1686 commented 8 years ago

Thanks Ivan, for now I am using (my terrible) JS: window.confirm = function (e) { return true; };

for (var i in document.getElementsByClassName("quickdelete_link")){ document.getElementsByClassName("quickdelete_link")[i].click() }

I might try fixing it later.

colonelpanic8 commented 8 years ago

yeah, all you would need to do is look at the request that that is generating and update okcupyd accordingly