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

how to flush the messages to a database ? #50

Closed markyann11 closed 9 years ago

markyann11 commented 9 years ago

when it hits the 300 messages, how can I move all the messages to a database (so I don't loose track of converastions) and clean the okcupid inbox?

colonelpanic8 commented 9 years ago

There is a db module in the okcupyd library that should help with this.

basically:

from okcupyd.db import mailbox
from okcupyd.user import User
user = User()
mailbox.Sync(user).all()

You will need to delete the messages separately.