Comments (5)
这个和下面的两种同时存在,都需要
https://api.weibo.cn/2/searchall 搜索页面的广告
这个url现在对应的json样式如下:
Line 17 in 613f9b2
Lines 99 to 108 in 613f9b2
所以这个判断方式不起作用了,需要直接判断
obj.items[i].mblogtype
Quantumult X里的用法:
^https://api.weibo.cn/2/searchall url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test_2.js
from surge.
https://api.weibo.cn/2/statuses/extend 单条微博看评论的界面
这个url现在对应的json样式如下:
所以
Line 7 in 613f9b2
Lines 54 to 57 in 613f9b2
应该改成
obj.head_cards
就可以了Quantumult X里的用法:
^https://api.weibo.cn/2/statuses/extend url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test_4.js
from surge.
https://api.weibo.cn/2/statuses/repost_timeline 单条微博看转发的页面
对应json:
if (obj.reposts && obj.reposts.length > 0) {
let i = obj.reposts.length;
while (i--) {
if (obj.reposts[i].mblogtype && obj.reposts[i].mblogtype == 1) {
obj.reposts.splice(i, 1);
}
}
}
Quantumult X里的用法:
^https://api.weibo.cn/2/statuses/repost_timeline url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test_5.js
06/27/2024 update:
现在广告在 hot_reposts 中了,逻辑跟上述代码类似,我更新了 wb_ad_test_5.js,所以 Quantumult X 用法不变。
from surge.
from surge.
https://api.weibo.cn/2/searchall 搜索页面的广告
对应json:
现在需要判断 obj.items[i].items[i].data
, 可参考我的js: https://github.com/ZhiyuanMa2017/Scripts/blob/master/wb_ad_test_6.js
我对card_type
和 title_extra_text
做判断,如果true就删掉最上层的items[i]
对于 https://api.weibo.cn/2/searchall ,这种样式的json和上面提到的json同时存在,有两种返回结果,现在我的做法:
if (obj.items && obj.items.length > 0) {
let i = obj.items.length;
while (i--) {
if (obj.items[i].data && obj.items[i].data.mblogtype && obj.items[i].data.mblogtype == 1) {
obj.items.splice(i, 1);
} else if (isAd(obj.items[i])) {
obj.items.splice(i, 1);
}
}
}
function isAd(item) {
if (item.items) {
let n = item.items.length
for (let i = 0; i < n; i++) {
let cur = item.items[i];
if (cur.data && cur.data.card_type && cur.data.card_type == 22) {
return true;
}
if (cur.data && cur.data.title_extra_text && cur.data.title_extra_text == "\u5e7f\u544a") {
return true;
}
}
}
return false;
}
Quantumult X里的用法:
^https://api.weibo.cn/2/searchall url script-response-body https://raw.githubusercontent.com/ZhiyuanMa2017/Scripts/master/wb_ad_test_6.js
from surge.
Related Issues (20)
- 对于新上架的商品,淘宝和京东的比价都会导致打不开新上架商品的链接 HOT 1
- Disney+ 评分
- Netflix 单季评分 HOT 1
- 微博启动广告脚本更新 HOT 3
- 请教一个问题 HOT 1
- jd_price.js失效 HOT 2
- Netflix评分剧集豆瓣评分失效了 HOT 3
- 脚本失效了,京东显示无价格信息淘宝商品详情页打不开 HOT 3
- 微博-消息-动态区域出现广告 HOT 1
- 圈x淘宝脚本开启后,淘宝点哪里查看历史价格?
- 更新:流量全局模式下微博12.5.3 去首页广告失效,且切换为走规则后依然无效,评论区去广告正常
- 淘宝,京东比价
- 微博去开屏广告已失效
- 期望增加欧可林APP签到获得积分的任务脚本 HOT 1
- jd_price_lite.js 提示升级 HOT 1
- 微博广告新url HOT 2
- Netflix评分失效了吗 HOT 4
- 新的微博广告链接 HOT 5
- surge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surge.