Пример #1
0
def decode_unionid(unionid_text):
    numbers = unionid.decode(unionid_text)
    if len(numbers) == 3:
        click.echo('user_id={} feed_id={} offset={}'.format(*numbers))
    elif len(numbers) == 2:
        click.echo('user_id={} feed_id={}'.format(*numbers))
    else:
        click.echo(numbers)
Пример #2
0
def _decode_union_feed_ids(option_feeds):
    """
    >>> _decode_union_feed_ids('014064,0140be')
    [196, 366]
    """
    return [unionid.decode(x)[1] for x in option_feeds.strip().split(',')]