qmqy
V2EX  ›  问与答

请问如何抓取知乎专栏?

  •  
  •   qmqy · Jul 29, 2014 · 9708 views
    This topic created in 4486 days ago, the information mentioned may be changed or developed.
    我并不打算盗用文章,只是想做成rss供自己阅读,不打算大范围传播.....
    知乎专栏用了ajax技术,市面上的采集工具都试过,不好使...
    请大神指教!
    22 replies  •  2014-07-30 13:58:34 +08:00
    ttph1oc
    ttph1oc
    Jul 29, 2014❤️1
    1
    方案1 PhantomJS
    方案2 打开控制台看看知乎专栏的API,抓取和处理http://zhuanlan.zhihu.com/api/columns/xxx/posts、http://zhuanlan.zhihu.com/api/columns/xxx/posts/xxx这类的东西等等
    PotatoBrother
    PotatoBrother
    Jul 29, 2014❤️1
    2
    这是 @faceair 大大写的知乎日报网页版: http://www.zhihudaily.net,源代码在这 https://github.com/faceair/zhihudaily

    还有@RIcter 大大自制的的 RSS 源: http://www.ricter.me/articles/153
    PotatoBrother
    PotatoBrother
    Jul 29, 2014
    3
    连接没发好,楼主见谅
    PotatoBrother
    PotatoBrother
    Jul 29, 2014
    4
    连接->链接
    airyland
    airyland
    Jul 29, 2014
    5
    @PotatoBrother 楼主是问 专栏 不是 日报 吧。
    PotatoBrother
    PotatoBrother
    Jul 29, 2014
    6
    @airyland http://www.zhihudaily.net/sections 这里面有专栏,楼主也可以去看看源代码的实现
    PotatoBrother
    PotatoBrother
    Jul 29, 2014
    7
    @airyland 好吧我看错了......是专栏不是专题
    PotatoBrother
    PotatoBrother
    Jul 29, 2014❤️1
    8
    最近老是看错主楼的要求,常常回答一些不相干的东西,罪过罪过
    以后可要认真审题
    TangMonk
    TangMonk
    Jul 29, 2014❤️1
    9
    windows的话弄个 fiddler 来抓取数据呗。(mac 上貌似没有比这货还好用的)
    zhxhwyzh14
    zhxhwyzh14
    Jul 29, 2014
    11
    有一个软件叫做知乎助手
    zhxhwyzh14
    zhxhwyzh14
    Jul 29, 2014❤️1
    12
    messagebus
    messagebus
    Jul 29, 2014 via Android❤️1
    13
    qmqy
    qmqy
    OP
    Jul 29, 2014
    14
    @ttph1oc
    非常感谢!不过我毕竟不是程序员,第二个方案时间成本有些高,第一个方案PhantomJS确实是个神器(同时发现了另一个神器CasperJS ),google了一大堆文档,自己也写了相关js,抓是抓到了文章,但是考虑到还要避免文章重复、文章远程发布、contab定时任务、图片保存等等问题......算了,这不是我的专长T_T......
    no13bus
    no13bus
    Jul 29, 2014❤️1
    15
    @qmqy 你都知道这些概念了。百度下就行了
    qmqy
    qmqy
    OP
    Jul 29, 2014
    16
    @PotatoBrother
    无论如何,谢谢你啦~13楼给出了解决方案。

    @zhxhwyzh14
    谢谢!这个软件真是意外收获~

    @ccbikai
    Wow!早知道你写好了我就不用费那么大劲折腾了T_T........请问你的服务会一直开下去吗?推广开后可以考虑适当收费啊~
    qmqy
    qmqy
    OP
    Jul 29, 2014
    17
    @no13bus
    行,最近忙着找工作,等时间稳定了再研究研究。谢谢了!
    PotatoBrother
    PotatoBrother
    Jul 29, 2014 via iPhone
    18
    @qmqy 我是添乱的😢
    messagebus
    messagebus
    Jul 30, 2014 via Android❤️1
    19
    @qmqy 不敢保证一直,不过尽量会坚持下去
    qmqy
    qmqy
    OP
    Jul 30, 2014
    20
    @ccbikai
    请问下,你有接口调用这方面的教程呢?我看了一下你给的api地址,一大坨东西,关是概念就很难理解....或者能说一下你调用的过程吗?谢谢!
    messagebus
    messagebus
    Jul 30, 2014
    21
    @qmqy 没有教程。API返回的是JSON格式的数据,你先了解下 JSON
    qmqy
    qmqy
    OP
    Jul 30, 2014
    22
    @ccbikai
    好的,谢谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4226 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 08:09 · PVG 16:09 · LAX 00:09 · JFK 03:09
    ♥ Do have faith in what you're doing.