iOS access to Safari Reader feature through UIWebView

前端 未结 6 699
梦如初夏
梦如初夏 2020-12-23 18:19

I am using iOS 4.3 & was wondering if there is any way that I can access the Safari\'s \"Reader\" feature through which webpages are removed of ads & other riff raff

6条回答
  •  遥遥无期
    2020-12-23 18:51

    Dont parse HTML natively on iOS, I have done it before and its a messy business. Either create your own web service to do all the nasty work or look into using readability (readability.com) they provide an API. There is also an open source ruby, python and php readability port that you can find here

    https://github.com/iterationlabs/ruby-readability

    https://github.com/gfxmonk/python-readability

    http://code.fivefilters.org/p/php-readability/source/tree/master/

    For you ruby enthusiasts, readability is also available as a gem, just google it.

提交回复
热议问题