id related functions.
get an id based on url and time.
# jsb/utils/id.py # # """ id related functions. """
from jsb.utils.generic import toenc
import uuid
def getrssid(url, time): """ get an id based on url and time. """ key = unicode(url) + unicode(time) return str(uuid.uuid3(uuid.NAMESPACE_DNS, toenc(key)))