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

[Anti Spam] 垃圾评论屏蔽,欢迎各位提供屏蔽规则 #281

Open
sunbeams001 opened this issue Mar 6, 2021 · 30 comments
Open

[Anti Spam] 垃圾评论屏蔽,欢迎各位提供屏蔽规则 #281

sunbeams001 opened this issue Mar 6, 2021 · 30 comments

Comments

@sunbeams001
Copy link
Collaborator

sunbeams001 commented Mar 6, 2021

已实装,设置-常规-过滤垃圾评论
目前模式是域名匹配为主,因为垃圾评论一般是发链接的
现有的规则会更新在这,随 release 发布生效
可以在本issue回复要添加/删除的规则,也可以直接PR

目前已生效规则见文件
https://cdn.jsdelivr.net/gh/CeuiLiSA/Pixiv-Shaft@master/app/src/main/assets/comment.filter.rule.txt

自己 PR 直接修改的见文件
https://github.com/CeuiLiSA/Pixiv-Shaft/blob/master/app/src/main/assets/comment.filter.rule.txt

规则解释:
0: 域名匹配(http|https), 默认包含子域名
1: 正则匹配
2: 列表正则全匹配,以$$分割的子正则串全部匹配时认为匹配

@sunbeams001
Copy link
Collaborator Author

sunbeams001 commented Mar 6, 2021

第一批

52m.site
52m.tech
88p.live
bjhs8535ns.work
discord.gg
i50dh.info
mm6.live
p8m.live
pp9.news
pp9.store
q33.live
ur1.one

第二批

wp8.email
yesxdxw.xyz
http://[0-9a-zA-Z.]+/portal\.php\?x=\d{6,}
(资源|交易).*[Qq]{1,2}\d{9,}

@sunbeams001 sunbeams001 changed the title 垃圾评论屏蔽功能筹备中,欢迎用户提供匹配规则 [Anti Spam] 垃圾评论屏蔽,欢迎各位提供屏蔽规则 Mar 6, 2021
@sunbeams001 sunbeams001 mentioned this issue Mar 7, 2021
@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Mar 8, 2021

建议在这个repo里面增加一个spamdomain.list,然后让app在某些时候爬这个repo的list来拦截。这样可以动态更新。而且用github的服务不用带宽。

可以看看这个repo,里面有大量拦截的域名,其中就有拦截#FFFF00的list。

我个人用Pi-hole的DNS拦截,因为DNS拦截只能拦截域名,所以可以用这个作为搜寻关键词。

discord.gg 应该是误报,这个是discord的域名,玩游戏聊天语音的时候用的。
ur1.one应该是短网址服务。

可以上网查一下那些域名是什么东西。

有时候这些评论有机会含有不常用的unicode字符来避免屏蔽?看看能不能用这个来作为规则?

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles

  1. app获取外部内容是不合适的,不能保证所有用户都有正常的网络;而且数据也过多了,大量正则匹配会影响性能
  2. 我不认为在插画评论里发 discord 地址算误报,起码也是无关广告
  3. 短链接地址也很可疑,毕竟正常用户评论作品也不太会发这个

如果你发现哪个正常评论有使用了这些服务再来提起修改吧,目前我看到的都是需要屏蔽的评论
unicode字符,我印象中是没有用的

@SodaWithoutSparkles
Copy link
Contributor

不是,不能连接网络还怎么上pixiv,如果连github也连接不到还怎么下载这个app?如果是google play下载的,那么应该也能上到github啊。。。

个人认为还是不要在程序里面hard code拦截规则,能变才是最好的。所以还是建议让程序爬这个repo里面的某一个档案更新拦截库吧。

@sunbeams001
Copy link
Collaborator Author

sunbeams001 commented Mar 9, 2021

@SodaWithoutSparkles 内地的网络我只能说很复杂,github服务是不可靠的
而且我试了一下,你给的repo里,几个规则文件里都没有找到匹配的啊,就比如第一个 52m.site 就没有

@soloopooo
Copy link

@SodaWithoutSparkles 内地的网络我只能说很复杂,github服务是不可靠的

jsdelivr

@sunbeams001
Copy link
Collaborator Author

@soloopooo 感谢推荐,确实可以用

@soloopooo
Copy link

而且我试了一下,你给的repo里,几个规则文件里都没有找到匹配的啊,就比如第一个 52m.site 就没有

本地+远程双保险即可,或者新开一个repo做屏蔽域名后端

@soloopooo
Copy link

另,屏蔽垃圾评论时,可以考虑让用户自行选择屏蔽原图作者发出的广告评论。如果将作者的广告(discord群组和金主链接)等一股脑屏蔽,可能会出现其他问题。

@sunbeams001
Copy link
Collaborator Author

另,屏蔽垃圾评论时,可以考虑让用户自行选择屏蔽原图作者发出的广告评论。如果将作者的广告(discord群组和金主链接)等一股脑屏蔽,可能会出现其他问题。

这种不是都放作品简介里吗,考虑太多感觉没完没了
要不完全给用户自定义,要不砍掉这个功能
可以改成默认不开启屏蔽,想屏蔽的用户自担风险OK?

@SodaWithoutSparkles
Copy link
Contributor

而且我试了一下,你给的repo里,几个规则文件里都没有找到匹配的啊,就比如第一个 52m.site 就没有

這些list不一定能包括所有,但是能拦截很多。始终不能预防式添加,只能等网站出来了被动添加,一定跟不上。

@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Mar 13, 2021

7mm.live
33h.live
88p.live
77k.live
55n.live

总觉得*.live也行,或者这个regex
/[0-9A-Za-z]\.[A-Za-z]{3,}/g

还有一堆加q的,或者可以用这个regex
[qQ][0-9]{9,}
不过可能这个regex会有误封,建议配合"资源"和"诚信交易"等字眼

而且大部分都是用http,可能可以针对http拦截。http没有加密不安全,加上现在正规网站都是https了。那些网站随时都可能被封所以不会去买https证书的(应该)。

刚刚发现了一样东西,好像这些网址都是同一个架构:http://[domain]/portal.php?x=[6_numbers],或许可以regex match portal.php?x=[6_numbers]

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles 很好,portal 这个规则加进去了,QQ这个规则感觉很可能屏蔽错啊,多搞点原文看看,那些描述是在前面还是后面的?

@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Mar 14, 2021

@sunbeams001 你刚刚新增的regex好像有问题。\?.符号需要escape。建议使用这个:

http:\/\/[0-9a-zA-Z.]+\/portal\.php\?x=\d{5,}

可以去这个网站测试

qq这个是卖*的,到处都有,去某些tag的热门分页的插画就能看到了,简直是丢人丢到外国去了🤦🏻‍♂️。虽然好像被封号了,但是号随便就可以注册。

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles 代码没事,没用代码框起来被github转义了

@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Mar 14, 2021

@SodaWithoutSparkles 代码没事,没用代码框起来被github转义了

/符号不用escape吗?

那个QQ卖*的例子我怕被封号,不发了。

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles '/'安卓正则里没事的,QQ规则加上了

@SodaWithoutSparkles
Copy link
Contributor

建议用大代码框框住所有domain。是三个backtick那个。

同时建议在app里面新增一个按钮可以立刻同步拦截清单。

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles 以现在的发布频率来说没有必要手动同步,关了再开就同步了

@CeuiLiSA CeuiLiSA pinned this issue Mar 14, 2021
@CeuiLiSA CeuiLiSA reopened this Mar 15, 2021
@SodaWithoutSparkles
Copy link
Contributor

V 3.1.5

https://luolii555luluolii555luluolii555lulu0lii555lululu0lii55.lili10ullill55.icu/portal.php?x=1322954 这个网站regex不知道为什么拦截不到。

现在被回复的评论都会显示,即便是应该拦截的。例如这样:甲发了一个应该被屏蔽的评论,乙回复这个评论。甲的评论在乙的回复仍然能看见。建议修改为"该评论已被屏蔽"或者连乙的评论都处理掉。

IMG_20210327_004342.jpg

@sunbeams001
Copy link
Collaborator Author

@SodaWithoutSparkles

  1. 你这个是 https 的,之前给的规则是 http,需要加吗,好像就这1个买了域名
  2. 对广告的评论我认为不至于删除吧,看看骂广告哥不也挺解压?这个之后我发个投票看看

@SodaWithoutSparkles
Copy link
Contributor

只看域名看漏了,下一次规则应该是http或者https也match

骂广告哥我个人觉得最好还是吧原文屏蔽,需要的话就点开吧,像spoilers tag 那样(黑幕)。例如萌百的黑幕那样,有需要才点开。

@sunbeams001
Copy link
Collaborator Author

sunbeams001 commented Mar 26, 2021

@SodaWithoutSparkles 试想一下,你开了过滤,你知道隐藏的是广告,你还点开看一眼,我觉得不太符合正常思维。如果做还是直接整条干掉吧

投票来了
https://t.me/c/1321480563/14391

@20171213
Copy link

有些评论会带有广告的黄色网站,是不是也能屏蔽

@sunbeams001
Copy link
Collaborator Author

有些评论会带有广告的黄色网站,是不是也能屏蔽

来个例子,现在开启过滤以后很少见到还有垃圾评论

@SodaWithoutSparkles
Copy link
Contributor

那个regex应该能够屏蔽大部分了,举个栗子🌰?

@20171213
Copy link

有些评论会带有广告的黄色网站,是不是也能屏蔽

来个例子,现在开启过滤以后很少见到还有垃圾评论

https://www.pixiv.net/artworks/84459345
Screenshot_20210420-010327_PixEz.png
这种或许是?

@sunbeams001
Copy link
Collaborator Author

@xushet 你先去设置里打开过滤功能再看

@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Apr 20, 2021

@xushet 看过了,我找不到那个评论,看起来应该被屏蔽掉了,确认你开了屏蔽功能?

@sunbeams001 或者以后可以搞个debug log之类的东西,把设定的选项都扔进去,然后可以让开发者看看会不会是某个选项造成的影响,顺便把android version 和os version写进去,也把能不能上google(是不是在墙外)写进去,那样或许可以方便debug?

@SodaWithoutSparkles
Copy link
Contributor

SodaWithoutSparkles commented Jun 30, 2021

刚刚发现跑掉了一个

○莉资源347□□□4341或326□□□5884
都可🏠扣扣

是数字

应该不在规则里面,看看需不需要包含

具体插画ID忘了,我只是复制了评论

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants