diff --git a/scripts/main.py b/scripts/main.py index d04cb25..e4f116a 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -5,7 +5,8 @@ def out(text): outfile.write(text + "\n") -out("! YouTube spam comment filter for Japanese") +out("! Homepage: https://github.com/akku1139/YouTube-spammer-filter") +out("! Title: YouTube spam comment filter for Japanese") def make(filename, comment, func): out("\n! " + comment) @@ -15,12 +16,12 @@ def make(filename, comment, func): continue if line.startswith("#"): continue - out("www.youtube.com" + func(line.strip())) + out("www.youtube.com###sections " + func(line.strip())) -make("channels.txt", "spammer channels", lambda line: ("##a[href=\"/" + urllib.parse.quote(line.removeprefix("/").removesuffix("\n"), safe="@") + "\"]:upward(6)")) +make("channels.txt", "spammer channels", lambda line: ("a[href=\"/" + urllib.parse.quote(line.removeprefix("/").removesuffix("\n"), safe="@") + "\"]:upward(6)")) -make("words.txt", "spam words", lambda line: ("###content-text>span:has-text(/" + line + "/):upward(5)")) +make("words.txt", "spam words", lambda line: ("#content-text>span:has-text(/" + line + "/):upward(5)")) -make("templates.txt", "template comments", lambda line: ("###content-text>span:has-text(\"" + line + "\"):upward(5)")) +make("templates.txt", "template comments", lambda line: ("#content-text>span:has-text(\"" + line + "\"):upward(5)")) outfile.close()