(context)
return uid
Parse post.uid from a link
Parse post.uid from a link
Parse post . uid from a link
def uid_from_context(context):
    """
    Parse post.uid from a link
    """
    # id pattern found in link
    pattern = r"[0-9]+"
    uid = re.search(pattern, context)
    uid = uid.group(0) if uid else ""
    return uid
def uid_from_context ( context ) : # id pattern found in link pattern = r"[0-9]+" uid = re . search ( pattern , context ) uid = uid . group ( 0 ) if uid else "" return uid