#!name=微博去广告&净化
#!desc=去除常见的广告和部分多余的模块
#!author=奶思[https://github.com/fmz200]
#!homepage=https://github.com/fmz200/wool_scripts
#!icon=https://raw.githubusercontent.com/fmz200/wool_scripts/main/icons/apps/Weibo-00.png
#!raw-url=https://github.com/fmz200/wool_scripts/raw/main/Loon/plugin/weibo.plugin
#!tg-group=https://t.me/lanjieguanggao
#!category=奶思的模块
#!tag = 去广告, 微博, fmz200
#!system = iOS, iPadOS
#!system_version = 
#!loon_version = 
#!date=2025-07-30 14:30:17
#############################################
# > "reject"        策略返回 HTTP 状态码 404,不附带任何额外内容
# > "reject-200"    策略返回 HTTP 状态码 200,不附带任何额外内容
# > "reject-img"    策略返回 HTTP 状态码 200,同时附带 1px gif
# > "reject-dict"   策略返回 HTTP 状态码 200,同时附带一个空的 JSON 对象
# > "reject-array"  策略返回 HTTP 状态码 200,同时附带一个空的 JSON 数组
# > "reject-drop"   拒绝并丢弃请求，且不会返回任何响应。
#############################################


[Rule]
# 收集用户信息，上传用户日志的请求
URL-REGEX, ^https?:\/\/api\.weibo\.cn\/2\/(push\/active|client\/addlog_batch|ad\/preload), REJECT-DROP
URL-REGEX, ^https?:\/\/api-cloudim\.api\.weibo\.com\/v1\/log\/, REJECT-DROP

# 微博开屏广告
DOMAIN-SUFFIX, biz.weibo.com, REJECT
DOMAIN, bootpreload.uve.weibo.com, REJECT
# 其他广告
DOMAIN-SUFFIX, fastimage.uve.weibo.com, REJECT
DOMAIN-SUFFIX, adimg.vue.weibo.com, REJECT
DOMAIN-SUFFIX, zymo.mps.weibo.com, REJECT
DOMAIN-SUFFIX, weibomingzi.com, REJECT
DOMAIN-SUFFIX, sdkapp.uve.weibo.com, REJECT
DOMAIN-SUFFIX, promote.biz.weibo.cn, REJECT
DOMAIN-SUFFIX, gw5.push.mcp.weibo.cn, REJECT
DOMAIN-SUFFIX, gw6.push.mcp.weibo.cn, REJECT
DOMAIN-SUFFIX, game.weibo.cn, REJECT
DOMAIN-SUFFIX, adimg.uve.weibo.com, REJECT
DOMAIN-SUFFIX, game.weibo.com, REJECT
DOMAIN-SUFFIX, ads.viber.com, REJECT
DOMAIN-SUFFIX, ads-d.viber.com, REJECT
DOMAIN-SUFFIX, ads.aws.viber.com, REJECT
DOMAIN-SUFFIX, alitui.weibo.com, REJECT
DOMAIN-SUFFIX, dp.im.weibo.cn, REJECT
DOMAIN-SUFFIX, biz.weibo.com.cn, REJECT
DOMAIN-SUFFIX, click.uve.weibo.com, REJECT
DOMAIN-SUFFIX, wax.weibo.com, REJECT
DOMAIN-SUFFIX, wbapp.uve.weibo.com, REJECT
DOMAIN-SUFFIX, widget.weibo.com, REJECT
DOMAIN-SUFFIX, dsp.edm.weibo.cn, REJECT
DOMAIN-SUFFIX, alitui.weibo.com.cn, REJECT
DOMAIN-SUFFIX, tui.weibo.com, REJECT
DOMAIN-SUFFIX, wax.weibo.com.cn, REJECT
DOMAIN-SUFFIX, ad.weibo.com, REJECT
# 屏蔽信息收集
DOMAIN, datacollection.uve.weibo.com, REJECT
DOMAIN, adpinpai.video.weibocdn.com, REJECT

[Rewrite]
# 热门视频 | 热推荐
^https?:\/\/api\.weibo\.c(n|om)\/\d\/(cardlist\?v_f=\d|ad\/weibointl\?) reject-dict
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php\?a=hot_search_users reject-dict
# 私信中绿洲的擦边诱导推广
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php\?a=treehole&auth= reject-dict
# 屏蔽首页左上角每日的弹窗tips
^https?:\/\/m?api\.weibo\.c(n|om)\/\d/push\/daily reject-dict
# 超话按钮的提示
^https?:\/\/api\.weibo\.c(n|om)\/2\/!\/huati\/(discovery_home_bottom_getdotinfo|mobile_discovery_searchchange)\? reject-dict
# 开屏广告
^https?:\/\/bootrealtime\.uve\.weibo\.com\/v\d\/ad\/realtime reject-dict
^https?:\/\/bootpreload\.uve\.weibo\.com\/v\d\/ad\/preload reject-dict
^https?:\/\/sdkapp\.uve\.weibo\.com\/interface\/sdk\/(get-lbs-cell-info\.php|sdkconfig\.php) REJECT
# 微博长文章推广
^https:\/\/card\.weibo\.com\/article\/m\/aj\/(reward|uvead)\? reject-dict
^https:\/\/weibo\.com\/ttarticle\/x\/m\/aj\/(reward|uvead)\? reject-dict
# 微博
^https?:\/\/api\.weibo\.cn\/2\/!\/huati\/discovery_home_bottom_channels reject-dict
^https?:\/\/api\.weibo\.cn\/2\/!\/chaohua\/discovery\/home_bottom\/switch reject-dict
^https?:\/\/api\.weibo\.cn\/2\/!\/was\/finder\/searchbarchange\? reject-dict
^https?:\/\/api\.weibo\.cn\/2\/logservice\/service\? reject
# 搜索页面净化
^https?:\/\/api\.weibo\.cn\/2\/cardlist\? response-body-json-jq 'del(.items[] | select(.category == "group"))'

[Script]
# 微博移除发现页广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/search\/(finder|container_timeline|container_discover)\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博移除发现页广告

# 微博热搜页面广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/(page|flowpage)\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博热搜页面广告

# 微博话题页面广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/searchall\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博话题页面广告

# 微博超话页面广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/container_timeline_topicpage\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博超话页面广告

# 微博超话tab页净化
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/container_timeline_topic\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博超话tab页净化

# 微博详情页面广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/extend\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博详情页面广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/container_detail\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博详情页面广告

# 微博最顶部的tab页分组
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/groups\/allgroups\/v2 script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博最顶部的tab页分组

# 微博评论区广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/comments\/mix_comments\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博评论区广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/(container_detail_comment|container_detail_mix)\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博评论区广告

# 微博转发区广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/container_detail_forward\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_ads.js, requires-body=true, timeout=60, tag=微博转发区广告
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/statuses\/repost_timeline\? script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_main.js, requires-body=true, timeout=60, tag=微博转发区广告

# 微博去广告以及去除各部分推广模块 - cherish
http-response ^https?:\/\/m?api\.weibo\.c(n|om)/2/(cardlist|searchall|page|messageflow|statuses/(unread_)?friends(/|_)timeline|groups/timeline|statuses/(container_timeline|container_timeline_hot|unread_hot_timeline|extend|video_mixtimeline)|profile/(me|container_timeline)|video/(community_tab|remind_info|tiny_stream_video_list)|checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item) script-path=https://raw.githubusercontent.com/fmz200/wool_scripts/main/Scripts/weibo/weibo_main.js, requires-body=true, timeout=60, tag=微博去广告以及去除各部分推广模块
http-response ^https?:\/\/(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) script-path=https://raw.githubusercontent.com/zmqcherish/proxy-script/main/weibo_launch.js, requires-body=true, timeout=60, tag=微博去广告以及去除各部分推广模块

# 自定义tab皮肤
http-response ^https?:\/\/m?api\.weibo\.c(n|om)\/2\/!\/client\/light_skin script-path=https://raw.githubusercontent.com/zmqcherish/proxy-script/main/weibo_main.js, requires-body=true, timeout=60, tag=自定义tab皮肤

# 非会员设置tab皮肤 - cherish
http-response ^https?:\/\/new\.vip\.weibo\.c(n|om)\/littleskin\/preview script-path=https://raw.githubusercontent.com/zmqcherish/proxy-script/main/weibo_main.js, requires-body=true, timeout=60, tag=非会员设置tab皮肤

# 解锁微博会员APP图标
http-response ^https?:\/\/new\.vip\.weibo\.c(n|om)\/aj\/appicon\/list script-path=https://github.com/fmz200/wool_scripts/raw/main/Scripts/weibo/weibo_vip.js, requires-body=true, timeout=60, tag=解锁微博会员APP图标


[MITM]
# hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, new.vip.weibo.cn, *api.weibo.cn, sdkapp.uve.weibo.com
hostname = *.weibo.cn, *.weibo.com, weibo.com
