config.py 文件源码

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

项目:dinobuildr 作者: mozilla 项目源码 文件源码
def get_lfs_url(json_input, lfs_url):
    req = urllib2.Request(lfs_url, json_input)
    req.add_header("Accept", "application/vnd.git-lfs+json")
    req.add_header("Content-Type", "application/vnd.git-lfs+json")
    result = urllib2.urlopen(req)
    results_python = json.load(result)
    file_url = results_python['objects'][0]['actions']['download']['href']
    result.close()
    return file_url


# --- section 3: actually doing stuff! --------------------- #
# now the fun bit: we actually get to do stuff!
# ---------------------------------------------------------- #

# if the local directory doesn't exist, we make it.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号