V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yanwen
V2EX  ›  问与答

如何不安装网易新闻 app,查看网友分享出来的新闻评论

  •  
  •   yanwen · 2020-03-19 20:12:42 +08:00 · 1786 次点击
    这是一个创建于 1470 天前的主题,其中的信息可能已经有所发展或是发生改变。

    网易新闻的一大亮点是他的评论,但是碍于网友分享出来都需要下载 app 才可以查看评论。对于不想下载 app 的人怎么查看评论呢?

    这里有一个方法。

    以下举个例子:

    新闻 app 的连接是这个

    https://c.m.163.com/news/a/F83IRJ3G0001899O.html?spss=newsapp
    

    点击查看评论,会提示你下载 app。好,现在我们把目光转移到 PC 端的新闻网页连接:

    https://news.163.com/20/0319/16/F83IRJ3G0001899O.html
    

    然后我们查看 PC 端的评论是这个:

    http://comment.tie.163.com/F83IRJ3G0001899O.html
    

    然后 F83IRJ3G0001899O.html 这个是一样的。

    所以,我们要查看评论的话,只需要把这串东西复制出来,拼接到网址 http://comment.tie.163.com/ 的后面就可以了。

    JS 不大熟悉。如果大佬有空的话 求帮忙写个 user.js 。

    金币感谢。

    3 条回复    2020-03-20 00:35:16 +08:00
    Athrob
        1
    Athrob  
       2020-03-20 00:01:30 +08:00   ❤️ 1
    ```
    // ==UserScript==
    // @name 网易新闻跟贴
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author You
    // @match https://c.m.163.com/news/a/*.html*
    // @grant none
    // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
    // ==/UserScript==

    (function() {
    'use strict';

    var tie = $('.reply.js-reply.js-open-newsapp');
    var id = tie.attr('data-param');
    var url = 'https://comment.tie.163.com/' + id.replace('tie\/', '') + '.html';
    var html = '<span class="reply"><a href="' + url + '" target="_blank">😂查看跟贴</a></span>';
    tie.parent().append(html);
    })();
    ```
    Athrob
        2
    Athrob  
       2020-03-20 00:04:06 +08:00   ❤️ 1
    yanwen
        3
    yanwen  
    OP
       2020-03-20 00:35:16 +08:00
    @Athrob 谢谢大佬~~~
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5404 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:55 · PVG 15:55 · LAX 00:55 · JFK 03:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.