yichahucha / surge

Some useful scripts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

微博广告新url

ZhiyuanMa2017 opened this issue · comments

近几天发现微博app和微博国际版app在使用 https://github.com/yichahucha/surge/blob/master/wb_ad.js 的时候timeline上仍然出现广告,尝试抓了下包,发现微博国际版通过 https://api.weibo.cn/2/ad/weibointl 这个url来获取广告微博,json样例在https://pastebin.com/fERWAFsq

简单尝试了下,直接清空data这个list就可以去除timeline广告:https://github.com/ZhiyuanMa2017/Scripts/blob/master/wb_ad_test.js
Quantumult X里的用法是:^https://api.weibo.cn/2/ad/weibointl url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test.js

您的正则表达式比较复杂,我怕改坏,您有空的话可以看下最新的情况,可以考虑做下修改,感谢!

至于微博app的广告,我一时半会复现不了,等有空了如果还有广告的话,我再抓一下看看。

微博app url https://api.weibo.cn/2/statuses/container_timeline
json格式如下(因有个人信息就不放样例了):
image
在body.items.data中,如果该条微博为广告,则mblogtype属性被设为1,正常关注的微博mblogtype为0。
(也有其他的属性设置不同,我没有更多地去比较。)
image
仿照您的js我写了个简单的script: https://github.com/ZhiyuanMa2017/Scripts/blob/master/wb_ad_test_2.js
Quantumult X用法:^https://api.weibo.cn/2/statuses/container_timeline url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test_2.js

fix