flickr.py 文件源码

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

项目:flickr-crawler 作者: chenusc11 项目源码 文件源码
def _dopost(method, auth=False, **params):
    #uncomment to check you aren't killing the flickr server
    #print "***** do post %s" % method

    params = _prepare_params(params)
    url = '%s%s/?api_key=%s%s'% \
          (HOST, API, API_KEY, _get_auth_url_suffix(method, auth, params))

    # There's no reason this can't be str(urlencode(params)). I just wanted to
    # have it the same as the rest.
    payload = '%s' % (urlencode(params))

    #another useful debug print statement
    if debug:
        print "_dopost url", url
        print "_dopost payload", payload

    return _get_data(minidom.parse(urlopen(url, payload)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号