V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gDD
V2EX  ›  Project Babel

其实imgur贴图挺好的,可以考虑支持

  •  
  •   gDD · 2012-03-09 11:05:28 +08:00 · 6249 次点击
    这是一个创建于 4445 天前的主题,其中的信息可能已经有所发展或是发生改变。
    注:我自己从来不用/没兴趣/不敢用(实名)新浪微博,也不用新浪的贴图,我也没贴图的需求。但我在V2EX帖过图片链接。

    ##Pros:
    * reddit上大量的[ imgur.com ]()贴图,服务的长久性能保证。(没因果关系)

    * imgur有流量统计功能。

    * imgur能创建账户对图片进行管理。不会出现这种[ http://www.v2ex.com/t/27074 ]() 问题。

    * 墙外的服务。

    ##Cons:
    * 中国IP在imgur上要注册才能上传图片。

    * 中国访问速度不稳定。
    3 条回复    1970-01-01 08:00:00 +08:00
    lin
        1
    lin  
       2012-03-09 11:37:41 +08:00
    还不错,我的网站(同样是用Babel v2搭建的)很早就用了,相关代码:

    # auto convert imgur.com links to image tags
    def imgur(value):
    imgs = re.findall('(http://imgur.com/[a-zA-Z0-9\/]+)\s?', value)
    if (len(imgs) > 0):
    for img in imgs:
    img_id = re.findall('http://imgur.com/([a-zA-Z0-9\/]+)', img)
    if (img_id[0] != ''):
    value = value.replace('http://imgur.com/' + img_id[0], '<a href="http://imgur.com/' + img_id[0] + '" target="_blank"><img src="http://i.imgur.com/' + img_id[0] + '.jpg" class="imgly" border="0" /></a>')
    return value
    else:
    return value
    register.filter(imgur)
    lin
        2
    lin  
       2012-03-09 11:38:37 +08:00
    9hills
        3
    9hills  
       2012-03-09 12:05:21 +08:00
    中国区的限制真心不方便。匿名上传的API用curl就能调,可惜中国区不能用啊。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3151 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 12:51 · PVG 20:51 · LAX 05:51 · JFK 08:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.