MCPcopy Create free account
hub / github.com/C3ting/ARL / filter_result

Method filter_result

app/tasks/github.py:44–61  ·  view source on GitHub ↗
(self, result: GithubResult)

Source from the content-addressed store, hash-verified

42 return item
43
44 def filter_result(self, result: GithubResult):
45 path_keyword_list = ["open-app-filter/", "/adbyby",
46 "/adblock", "luci-app-dnsfilter/",
47 "Spider/", "/spider", "_files/",
48 "alexa_10k.json", "/WeWorkProviderTest.php"]
49 for path in path_keyword_list:
50 if path in result.path:
51 return True
52
53 content_keyword_list = ["DOMAIN-SUFFIX", "HOST-SUFFIX", "name:[proto;sport;dport;host",
54 ' "websites": [',
55 "import android.app.Application;",
56 "import android.app.Activity;"]
57 for keyword in content_keyword_list:
58 if keyword in result.content:
59 return True
60
61 return False
62
63 def update_status(self, value):
64 query = {"_id": ObjectId(self.task_id)}

Callers 2

save_contentMethod · 0.95
save_mongoMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected