Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_client_version>=12.65起某些贴吧的吧首页主题帖接口中的主题帖信息jsonpath由.thread_list[]变成了.page_data.feed_list[].feed.business_info #222

Open
n0099 opened this issue Aug 12, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@n0099
Copy link

n0099 commented Aug 12, 2024

curl -s 'https://n0099.net/tbm/v1/client_tester.php?type=posts&forum=原神内鬼&pn=1&rn=30&client_version=12.65.1.1' \
| jq '.page_data.feed_list[2].feed.business_info'
[
  {
    "key": "thread_id",
    "value": "9125898508"
  },
  {
    "key": "forum_is_liked",
    "value": "0"
  },
  {
    "key": "forum_name",
    "value": "原神内鬼"
  },
  {
    "key": "abstract",
    "value": "被寄予厚望的一拳,从峰值第6到畅销榜跌破100,只用了16天。 而库洛人员规模800-899人。 "
  },
  {
    "key": "has_concerned_user",
    "value": "0"
  },
  {
    "value": "1",
    "key": "update_read_status"
  },
  {
    "key": "inner_tab_id",
    "value": "0"
  },
  {
    "key": "post_num",
    "value": "0"
  },
  {
    "key": "growth_level",
    "value": "8"
  },
  {
    "key": "view_num",
    "value": "95626"
  },
  {
    "key": "card_head_type",
    "value": "common_forum"
  },
  {
    "key": "thread_type",
    "value": "0"
  },
  {
    "value": "12311515353430611527",
    "key": "nid"
  },
  {
    "key": "forum_id",
    "value": "27497591"
  },
  {
    "key": "title",
    "value": "想知道为什么kl这么急吗?"
  },
  {
    "key": "media_thumbnail_url",
    "value": "http://tiebapic.baidu.com/forum/w%3D106%3Bq%3D80%3Bg%3D0/sign=c3550881b003738dde4a08228520c16c/709c8b391f30e924c2cdeb100a086e061d95f738.jpg?tbpicau=2024-08-23-05_dcaddcadef9c32f411ae97e9b1791168"
  },
  {
    "key": "recom_type",
    "value": "1"
  },
  {
    "key": "feed_social_source",
    "value": "2"
  },
  {
    "key": "can_multi_manage",
    "value": "1"
  },
  {
    "key": "user_id",
    "value": "629465956"
  },
  {
    "key": "member_num",
    "value": "0"
  },
  {
    "key": "forum_avatar",
    "value": "http://tiebapic.baidu.com/forum/w%3D120%3Bh%3D120/sign=d2254f6b454f78f0800b9ef1490a6268/6159252dd42a28341d53e7341db5c9ea15cebf1c.jpg?tbpicau=2024-08-23-05_284df06c0fbda81ec36847b6ec2313c2"
  },
  {
    "key": "media_pic_url",
    "value": "http://tiebapic.baidu.com/forum/w%3D106%3Bq%3D80%3Bg%3D0/sign=c3550881b003738dde4a08228520c16c/709c8b391f30e924c2cdeb100a086e061d95f738.jpg?tbpicau=2024-08-23-05_dcaddcadef9c32f411ae97e9b1791168"
  },
  {
    "value": "4",
    "key": "pic_count"
  },
  {
    "key": "gua_type",
    "value": "0"
  }
]
curl -s 'https://n0099.net/tbm/v1/client_tester.php?type=posts&forum=原神内鬼&pn=1&rn=30&client_version=12.64.1.1' \
| jq '.thread_list[2]'
{
  "id": 9124550380,
  "create_time": 1723259769,
  "is_novel": 0,
  "recom_source": "533003",
  "recom_weight": "1.8713",
  "log_param": [
    {
      "key": "fid",
      "value": "27497591"
    },
    {
      "key": "tid",
      "value": "9124550380"
    },
    {
      "key": "card_type",
      "value": "normal"
    }
  ],
  "is_xiuxiu_thread": 0,
  "is_protal": 0,
  "title": "百度可能自己都没想到会有1e转,首页直接显示9999w+了",
  "thread_types": 1040,
  "thread_type": 0,
  "author_id": 5410296852,
  "dislike_info": [
    {
      "dislike_reason": "质量不佳",
      "dislike_id": 110
    },
    {
      "dislike_id": 111,
      "dislike_reason": "过时了"
    },
    {
      "dislike_reason": "不感兴趣",
      "dislike_id": 112
    }
  ],
  "t_share_img": "http://tiebapic.baidu.com/forum/pic/item/b21c8701a18b87d6b3b3a53e410828381f30fd1a.jpg?tbpicau=2024-08-14-05_991c1741611edddd4005a5ad366befa1",
  "top_thread_set_time": 0,
  "is_activity": 0,
  "is_notice": 0,
  "media": [
    {
      "is_long_pic": 0,
      "lottie_type": 0,
      "origin_size": 757221,
      "dynamic_pic": "http://tiebapic.baidu.com/forum/w%3D320%3Bq%3D80%3Bg%3D0/sign=7ca1a92cbedcd100cd9cfe2342b0362d/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_b0e13b79b8915bd42017460d4084a50b",
      "width": 560,
      "height": 1244,
      "big_pic": "http://tiebapic.baidu.com/forum/w%3D320%3Bq%3D80%3Bg%3D0/sign=7ca1a92cbedcd100cd9cfe2342b0362d/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_b0e13b79b8915bd42017460d4084a50b",
      "src_pic": "http://tiebapic.baidu.com/forum/w%3D1920%3Bq%3D100/sign=f96f5d72b0246b607b0eb67dd9c8213d/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_9033e508f958c0f6faeb883294e18a15",
      "wth_mid_loc": 0.5,
      "jump_url": "",
      "guide_text": "",
      "origin_pic": "http://tiebapic.baidu.com/forum/pic/item/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-14-05_b9ba466a63e5d023129db4753eae1448",
      "show_original_btn": 1,
      "hth_mid_loc": 0.6375,
      "type": 3,
      "post_id": 150746580887
    }
  ],
  "last_read_pid": 0,
  "recom_reason": "",
  "is_partial_visible": 0,
  "tid": 9124550380,
  "author": {
    "user_show_info": {
      "feed_head": {
        "image_data": {
          "img_url": "http://tb.himg.baidu.com/sys/portrait/item/",
          "shape_type": 1,
          "pendant_url": "",
          "corner_url": "",
          "schema": "tiebaapp://router/portal?params=%7B%22page%22%3A%22person%2FpersonCenter%22%2C%22pageParams%22%3A%7B%22uid%22%3A5410296852%7D%7D"
        },
        "main_data": [
          {
            "text": {
              "can_degrade": 1,
              "degrade_len": 5,
              "degrade_priority": 1,
              "suffix": "...",
              "color": {
                "type": 2,
                "day": "CAM_X0301",
                "night": "CAM_X0301"
              },
              "text": "逗帅c-火烧索多玛",
              "priority": 8
            },
            "log_info": [
              {
                "key": "head_tag_click",
                "value": "[{\"import\":\"common_info_from_common_exp\",\"stat_type\":\"1\",\"base_info\":{\"obj_locate\":\"2\",\"obj_name\":\"4\",\"stat_key\":\"common_click\"}},{\"import\":\"common_info_from_c11438\",\"base_info\":{\"obj_type\":\"2\"}},{\"import\":\"common_info_of_ubc_stat\",\"base_info\":{\"type\":\"click\",\"value\":\"head_tag_click\"}}]"
              }
            ],
            "type": 1
          },
          {
            "icon": {
              "priority": 5,
              "can_degrade": 0,
              "url": "https://tieba-ares.cdn.bcebos.com/mis/2024-3/1709542090883/bd7d4e3b16c0.webp",
              "width": 62,
              "height": 39
            },
            "type": 2,
            "schema": "https://tieba.baidu.com/mo/q/hybrid-main-user/taskCenter?customfullscreen=1&nonavigationbar=1",
            "log_info": [
              {
                "key": "head_tag_click",
                "value": "[{\"stat_type\":\"1\",\"base_info\":{\"obj_locate\":\"1\",\"obj_source\":\"3\",\"obj_type\":\"2\",\"stat_key\":\"c15693\"}}]"
              },
              {
                "key": "head_tag_show",
                "value": "[{\"stat_type\":\"1\",\"base_info\":{\"obj_locate\":\"1\",\"obj_source\":\"3\",\"obj_type\":\"1\",\"stat_key\":\"c15693\"}}]"
              }
            ]
          },
          {
            "type": 3,
            "log_info": [
              {
                "key": "head_tag_click",
                "value": "[{\"stat_type\":\"1\",\"base_info\":{\"obj_locate\":\"1\",\"obj_source\":\"3\",\"obj_type\":\"2\",\"stat_key\":\"c15694\"}}]"
              },
              {
                "value": "[{\"stat_type\":\"1\",\"base_info\":{\"obj_locate\":\"1\",\"obj_source\":\"3\",\"obj_type\":\"1\",\"stat_key\":\"c15694\"}}]",
                "key": "head_tag_show"
              }
            ],
            "custom": {
              "data": "{\"can_degrade\":\"true\",\"degrade_priority\":\"2\",\"height\":39,\"level_id\":\"8\",\"level_name\":\"跳过人生\",\"priority\":\"7\",\"schema\":\"tiebaapp://router/portal?params=%7B%22page%22%3A%22frs%2FforumTitle%22%2C%22pageParams%22%3A%7B%22forumId%22%3A27497591%2C%22forumName%22%3A%22%E5%8E%9F%E7%A5%9E%E5%86%85%E9%AC%BC%22%7D%7D\",\"width\":44}",
              "style": "forum_level"
            }
          }
        ],
        "extra_data": [
          {
            "type": 1,
            "text": {
              "text": "0",
              "priority": 1,
              "can_degrade": 0,
              "type": 3
            }
          },
          {}
        ],
        "schema": "tiebaapp://router/portal?params=%7B%22page%22%3A%22person%2FpersonCenter%22%2C%22pageParams%22%3A%7B%22uid%22%3A5410296852%7D%7D"
      }
    },
    "show_icon_list": [
      {
        "sub_type": "name_show",
        "comment": "展示用户名",
        "height": 0,
        "show_type": 1,
        "type": "name_show",
        "ext_attr": [
          {
            "key": "red_color",
            "value": "1"
          }
        ],
        "prefix_img_src": "",
        "prefix_width": 0,
        "link_url": "",
        "degrade_img_src": "",
        "img_src": "",
        "width": 0,
        "degrade_height": 0,
        "degrade_width": 0,
        "prefix_height": 0,
        "text": "逗帅c-火烧索多玛"
      },
      {
        "sub_type": "user_growth_level",
        "show_type": 2,
        "degrade_height": 0,
        "degrade_width": 0,
        "img_src": "https://tieba-ares.cdn.bcebos.com/mis/2024-3/1709542090883/bd7d4e3b16c0.webp",
        "height": 39,
        "width": 62,
        "prefix_img_src": "",
        "prefix_height": 0,
        "type": "user_growth_level",
        "link_url": "https://tieba.baidu.com/mo/q/hybrid-main-user/taskCenter?customfullscreen=1&nonavigationbar=1",
        "prefix_width": 0,
        "comment": "用户成长等级",
        "degrade_img_src": "",
        "text": ""
      },
      {
        "degrade_width": 0,
        "text": "",
        "img_src": "",
        "link_url": "tiebaapp://router/portal?params=%7B%22page%22%3A%22frs%2FforumTitle%22%2C%22pageParams%22%3A%7B%22forumId%22%3A27497591%2C%22forumName%22%3A%22%E5%8E%9F%E7%A5%9E%E5%86%85%E9%AC%BC%22%7D%7D",
        "height": 39,
        "sub_type": "forum_level",
        "show_type": 3,
        "degrade_img_src": "",
        "degrade_height": 0,
        "prefix_img_src": "",
        "prefix_width": 0,
        "width": 44,
        "comment": "吧等级",
        "ext_attr": [
          {
            "key": "forum_id",
            "value": "27497591"
          },
          {
            "value": "原神内鬼",
            "key": "forum_name"
          },
          {
            "value": "8",
            "key": "level_id"
          },
          {
            "key": "level_name",
            "value": "跳过人生"
          }
        ],
        "prefix_height": 0,
        "type": "forum_level"
      }
    ]
  },
  "agree_num": 3346,
  "last_time_int": 1723467617,
  "is_book_chapter": 0,
  "share_num": 23,
  "nid": "10954420741276800842",
  "last_time": "8-12",
  "is_top": 0,
  "thread_share_link": "http://tieba.baidu.com/p/9124550380",
  "media_num": [
    {
      "pic": 1
    }
  ],
  "is_novel_reward": 0,
  "is_excellent_thread": 0,
  "comment_num": 0,
  "cheak_repeat": 1,
  "is_good": 0,
  "rich_abstract": [
    {
      "type": 0,
      "text": "应该是历史第一转发了。断层式领先所有二游痴的转发。"
    },
    {
      "origin_size": 757221,
      "cdn_src_active": "http://tiebapic.baidu.com/forum/w%3D720%3Bq%3D60%3B/sign=68488f29dd504fc2a25fb207d5e6962c/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_4c6b5803a90fc517543dd5ef98e39320",
      "type": 3,
      "origin_src": "http://tiebapic.baidu.com/forum/pic/item/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_7735d74b550191f43a1d3101f4d5562b",
      "big_cdn_src": "http://tiebapic.baidu.com/forum/w%3D960%3Bq%3D60/sign=2c063a22c144ebf86d716839e9c2a617/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_e3d37a27e62182a89c3bb4e2a07aeb55",
      "is_long_pic": 0,
      "show_original_btn": 1,
      "bsize": "560,1244",
      "cdn_src": "http://tiebapic.baidu.com/forum/w%3D720%3Bq%3D60%3Bg%3D0/sign=bfbae711fca1cd1105b670228929b9c1/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_41001ac1d8464e77000997bac96329f2"
    }
  ],
  "is_tiebaplus_ad": "0",
  "is_membertop": 0,
  "tiebaplus_cant_delete": 0,
  "is_bakan": 0,
  "is_voice_thread": 0,
  "is_ntitle": 0,
  "first_post_content": [
    {
      "text": "应该是历史第一转发了。断层式领先所有二游痴的转发。",
      "type": 0
    },
    {
      "type": 3,
      "is_long_pic": 0,
      "origin_size": 757221,
      "show_original_btn": 1,
      "cdn_src_active": "http://tiebapic.baidu.com/forum/w%3D720%3Bq%3D60%3B/sign=68488f29dd504fc2a25fb207d5e6962c/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_4c6b5803a90fc517543dd5ef98e39320",
      "bsize": "560,1244",
      "cdn_src": "http://tiebapic.baidu.com/forum/w%3D720%3Bq%3D60%3Bg%3D0/sign=bfbae711fca1cd1105b670228929b9c1/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_41001ac1d8464e77000997bac96329f2",
      "big_cdn_src": "http://tiebapic.baidu.com/forum/w%3D960%3Bq%3D60/sign=2c063a22c144ebf86d716839e9c2a617/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_e3d37a27e62182a89c3bb4e2a07aeb55",
      "origin_src": "http://tiebapic.baidu.com/forum/pic/item/f65f9adab6fd526697703f35ed18972bd50736c9.jpg?tbpicau=2024-08-23-05_7735d74b550191f43a1d3101f4d5562b"
    }
  ],
  "is_vote": 0,
  "meizhi_pic": "",
  "reply_num": 433,
  "view_num": 54634,
  "fid": 27497591,
  "first_post_id": 150746580887,
  "abstract": [
    {
      "type": 0,
      "text": "应该是历史第一转发了。断层式领先所有二游痴的转发。 "
    }
  ],
  "is_novel_thank": 0,
  "ab_tag": "normal",
  "agree": {
    "agree_num": 3346,
    "has_agree": 0,
    "agree_type": 0,
    "disagree_num": 21,
    "diff_agree_num": 3325
  },
  "is_highlight": 0
}
@n0099 n0099 changed the title _client_version>=12.65起某些贴吧的吧首页主题帖接口由.thread_list[]变成了.page_data.feed_list[].feed.business_info _client_version>=12.65起某些贴吧的吧首页主题帖接口中的主题帖信息jsonpath由.thread_list[]变成了.page_data.feed_list[].feed.business_info Aug 12, 2024
n0099 added a commit to n0099/open-tbm that referenced this issue Aug 12, 2024
…1.1` to fix lumina37/aiotieba#222, partial revert 89dc2b1 @ derived classes of `BaseCrawler`

@ crawler
@ c#

* fix tid cursor breakpoint of each forum in sitemap is still `ORDER BY tid DESC` after 83e82ad, and output forums `ORDER BY fid ASC` @ routes/web.php
@ be
n0099 added a commit to n0099/open-tbm that referenced this issue Aug 12, 2024
…1.1` to fix lumina37/aiotieba#222, partial revert 89dc2b1 @ derived classes of `BaseCrawler`

@ crawler
@ c#

* fix tid cursor breakpoint of each forum in sitemap is still `ORDER BY tid DESC` after 83e82ad, and output forums `ORDER BY fid ASC` @ routes/web.php
@ be
@lumina37
Copy link
Owner

看上去似乎没什么影响

@n0099
Copy link
Author

n0099 commented Aug 12, 2024

您做过兼容?

@lumina37
Copy link
Owner

难道原本的thread_list里的内容还会变少?

@n0099
Copy link
Author

n0099 commented Aug 12, 2024

.thread_list直接没了只有.page_data.feed_list[].feed.business_info

@lumina37
Copy link
Owner

感觉对protobuf确实没啥影响

@n0099
Copy link
Author

n0099 commented Aug 13, 2024

protobuf跟json都受到影响,我一直一来只发json而非protobuf encoding只是为了直观对比(aka避免某些人看到满屏幕hex0x00tl;dr 已读不回#207 (comment) 除非您能不依赖于.proto文件直接人脑decode protobuf encoding二进制就像 https://github.com/pawitp/protobuf-decoder
json跟protobuf的确历史上有些结果不同,例如有个PbContent.prototype(您称其fragment #114 (comment) 而我忘了具体是哪个type而且已经在当时清洗数据库时把json便乘protobuf encoding时正义削除了unknown field https://protobuf.dev/reference/cpp/api-docs/google.protobuf.util.json_util/#JsonParseOptions https://stackoverflow.com/questions/75318533/how-to-serialize-protobuf-from-json-with-auto-ignoring-unknown-fields-in-c protocolbuffers/protobuf#1389 )在21~22年我偶遇到您并获悉存在protobuf版本response后将tbm爬的接口从json版本response换成protobuf之前会爬到一些不存在于PbContent.proto的字段,但我目前并没有找到新出现的不一致
您为什么不亲自试试请求下这个接口的原神内鬼吧呢?

@n0099
Copy link
Author

n0099 commented Aug 13, 2024

算了反正您也像某PLT理论中级高手CS硕士工单系统kpi精神指导下认定issue不就是拿来close的吗 https://github.com/Starry-OvO/aiotieba/issues?q=is:issue+is:closed 并在close后对其开启已读不回模式正如同 https://z.n0099.net/#narrow/near/98064
等您以后需要爬这种灰度测试用上了.thread_list[]便乘.page_data.feed_list[].feed.business_info的吧亦或贴吧带pm继续扩大灰度范围甚至应用于所有贴吧乃至所有_client_version(从而导致第三方 #168 或远古版本客户端 n0099/tbclient.protobuf#2 不可用(吧首页主题帖列表接口显然是许多用户的主要入口所以即便其他接口没变也会造成不能用了的第一印象)正如同此前的许多暗改 #64 )时再说吧,我现在也懒得兼容这种静态类型语言996临时工serialize出来的{"Key":"a","Value":"1"}而是直接大脑降级滚回12.64.1.1 n0099/open-tbm@9782630

@n0099 n0099 closed this as completed Aug 13, 2024
@lumina37 lumina37 added the bug Something isn't working label Aug 13, 2024
@lumina37
Copy link
Owner

等影响到大客户再修吧,姑且把这个置个顶以备不时之需

@lumina37 lumina37 pinned this issue Aug 13, 2024
@n0099
Copy link
Author

n0099 commented Aug 13, 2024

大客户: @limuness

@lumina37 lumina37 reopened this Sep 1, 2024
@lumina37
Copy link
Owner

lumina37 commented Sep 1, 2024

这下确实影响到大客户了,暂时留在12.64版本看看他们要怎么改

@lumina37
Copy link
Owner

不知道最新客户端的机制变成啥样了,你能帮忙解一下最新版的protobuf吗,git diff比较方便

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants