|
@@ -438,8 +438,12 @@ namespace molilian.core
|
|
|
var blacklist = config.jd_blacklist_regular.Split('\n')
|
|
var blacklist = config.jd_blacklist_regular.Split('\n')
|
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
|
.ToList();
|
|
.ToList();
|
|
|
- bool is_blacklist = AlimamaPlus.MatchOtherInfo(content, blacklist);
|
|
|
|
|
- if (is_blacklist)
|
|
|
|
|
|
|
+ bool anyMatch = false;
|
|
|
|
|
+ foreach (string pattern in blacklist)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (Regex.IsMatch(content, pattern, RegexOptions.IgnoreCase)) anyMatch = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (anyMatch)
|
|
|
{
|
|
{
|
|
|
result.success = false;
|
|
result.success = false;
|
|
|
result.deeplink_url = string.Empty;
|
|
result.deeplink_url = string.Empty;
|
|
@@ -643,8 +647,12 @@ namespace molilian.core
|
|
|
var blacklist = config.pdd_blacklist_regular.Split('\n')
|
|
var blacklist = config.pdd_blacklist_regular.Split('\n')
|
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
|
.ToList();
|
|
.ToList();
|
|
|
- bool is_blacklist = AlimamaPlus.MatchOtherInfo(content, blacklist);
|
|
|
|
|
- if (is_blacklist)
|
|
|
|
|
|
|
+ bool anyMatch = false;
|
|
|
|
|
+ foreach (string pattern in blacklist)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (Regex.IsMatch(content, pattern, RegexOptions.IgnoreCase)) anyMatch = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (anyMatch)
|
|
|
{
|
|
{
|
|
|
result.success = false;
|
|
result.success = false;
|
|
|
result.deeplink_url = string.Empty;
|
|
result.deeplink_url = string.Empty;
|
|
@@ -746,8 +754,12 @@ namespace molilian.core
|
|
|
var blacklist = config.ks_blacklist_regular.Split('\n')
|
|
var blacklist = config.ks_blacklist_regular.Split('\n')
|
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
.Where(line => !string.IsNullOrWhiteSpace(line))
|
|
|
.ToList();
|
|
.ToList();
|
|
|
- bool is_blacklist = AlimamaPlus.MatchOtherInfo(content, blacklist);
|
|
|
|
|
- if (is_blacklist)
|
|
|
|
|
|
|
+ bool anyMatch = false;
|
|
|
|
|
+ foreach (string pattern in blacklist)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (Regex.IsMatch(content, pattern, RegexOptions.IgnoreCase)) anyMatch = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (anyMatch)
|
|
|
{
|
|
{
|
|
|
result.success = false;
|
|
result.success = false;
|
|
|
result.deeplink_url = string.Empty;
|
|
result.deeplink_url = string.Empty;
|