library.py 文件源码

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

项目:FalltoSkyBot 作者: Sakiut 项目源码 文件源码
def getLDIcon(pseudo):
    """Récupère l'icone leveldown depuis leur site"""

    pseudo = str(pseudo)
    url = "http://leveldown.fr/profile/{}".format(pseudo)
    fileName = "./ldsource/{}.html".format(pseudo)
    request.urlretrieve(url, fileName)

    with open(fileName) as f: lines = f.read().splitlines()

    Names = []
    Values = []

    for line in lines:
        if line.startswith('                            <div class="avatar"'):
            getLine = line.rstrip(');"></div>')
            Line = getLine.split("(")
            Line = Line[1]

    return Line

#####################################################################################################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号