main.py 文件源码

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

项目:Crawlers 作者: mi-minus 项目源码 文件源码
def getpage(url):
    c=pycurl.Curl()
    print url
    c.setopt(pycurl.URL,url)

    b=StringIO.StringIO()
    print '1'
    c.setopt(pycurl.WRITEFUNCTION,b.write)
    print '2'
    c.perform()
    print '-----'
    # f=open('%s/posts.txt' % setting.CURRENT_PATH,'wb')
    # f.write(b.getvalue())
    # f.close()
    return b.getvalue()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号