local.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:flickrsync 作者: danchal 项目源码 文件源码
def _get_flickr_id_secret_title_extension(filename):
    photoid = UNDEFINED
    secret = UNDEFINED
    title = UNDEFINED
    extension = UNDEFINED
    try:
        # the flickr title can be null
        photoid, secret, title, extension = re.fullmatch('^' + general.APPLICATION_NAME
            + '_([0-9]+)_([a-z0-9]+)_(.*)\.(' + '|'.join(PICTURE_TYPES) + ')', filename, re.IGNORECASE).group(1,2,3,4)

    except AttributeError:
        logger.debug('Not found')

    logger.debug('<{filename}>, <{photoid}>, <{secret}>, <{title}>, <{extension}>'.format(
        filename=filename, photoid=photoid, secret=secret, title=title, extension=extension))
    return photoid, secret, title, extension
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号