爱意满满的作品展示区。
metrue

分享一个获取网页 feature 图片的 gem

  •  
  •   metrue ·
    metrue · Apr 15, 2015 · 2451 views
    This topic created in 4122 days ago, the information mentioned may be changed or developed.

    最近一直在开发内容类 iOS APP,后端也是自己用 Ruby 来完成,过程中开发了一些小巧的 gem,这是其中一个,可以获取文章或者新闻的图片,这对于阅读类 APP 还是有点用的。

    Example

    gem install getf
    
    • use it in command line
    getf http://www.jianshu.com/p/89bf7ed4ae2c
    
    • use it in your Ruby script
    require 'getf'
    puts ImageGetter.on(url:"http://www.jianshu.com/p/89bf7ed4ae2c")
    

    https://github.com/metrue/getF

    2 replies    2015-04-16 10:04:17 +08:00
    hging
        1
    hging  
       Apr 16, 2015
    噗......这个Gem源码我看懂了. 哈哈.
    metrue
        2
    metrue  
    OP
       Apr 16, 2015 via iPhone
    @hging 用了很简单的方法,欢迎分享更多好方法。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1140 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:10 · PVG 07:10 · LAX 16:10 · JFK 19:10
    ♥ Do have faith in what you're doing.