Quellcode durchsuchen

#wikipedia-en-afc -> #wikipedia-en-afc-feed

tags/v0.1^2
Ben Kurtovic vor 13 Jahren
Ursprung
Commit
c48073515b
2 geänderte Dateien mit 11 neuen und 10 gelöschten Zeilen
  1. +10
    -10
      earwigbot/rules.py
  2. +1
    -0
      earwigbot/wiki/copyright.py

+ 10
- 10
earwigbot/rules.py Datei anzeigen

@@ -53,33 +53,33 @@ def process(rc):
comment = rc.comment.lower()

if "!earwigbot" in rc.msg.lower():
chans.update(("##earwigbot", "#wikipedia-en-afc"))
chans.update(("##earwigbot", "#wikipedia-en-afc-feed"))

if r_page.search(page_name):
tasks.start("afc_copyvios", page=rc.page)
chans.add("#wikipedia-en-afc")
#tasks.start("afc_copyvios", page=rc.page)
chans.add("#wikipedia-en-afc-feed")

elif r_ffu.match(page_name):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif page_name.startswith("template:afc submission"):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "move" and (r_move1.match(comment) or
r_move2.match(comment)):
p = r_moved_pages.findall(rc.comment)[0]
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "delete" and r_delete.match(comment):
p = r_deleted_page.findall(rc.comment)[0]
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "restore" and r_restore.match(comment):
p = r_restored_page.findall(rc.comment)[0]
tasks.start("afc_copyvios", page=p)
chans.add("#wikipedia-en-afc")
#tasks.start("afc_copyvios", page=p)
chans.add("#wikipedia-en-afc-feed")

elif rc.flags == "protect" and r_protect.match(comment):
chans.add("#wikipedia-en-afc")
chans.add("#wikipedia-en-afc-feed")

return chans

+ 1
- 0
earwigbot/wiki/copyright.py Datei anzeigen

@@ -191,6 +191,7 @@ class CopyrightMixin(object):
urls = search(chunks.pop(0))
urls = [url for url in urls if url not in handled_urls]
for url in urls:
handled_urls.append(url)
confidence = self._copyvio_compare_content(content, url)
if confidence > best_confidence:
best_confidence = confidence


Laden…
Abbrechen
Speichern