Sfoglia il codice sorgente

Fix logger, title splitting, and revid parsing (get_content())

tags/v0.1^2
Ben Kurtovic 13 anni fa
parent
commit
706299ee78
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      bot/tasks/afc_statistics.py

+ 3
- 3
bot/tasks/afc_statistics.py Vedi File

@@ -205,7 +205,7 @@ class Task(BaseTask):

for pageid, title, oldid in cursor:
msg = "Updating page [[{0}]] (id: {1}) @ {2}"
self.logger.debug(msg.format(pageid, title, oldid))
self.logger.debug(msg.format(title, pageid, oldid))
result = list(self.site.sql_query(query2, (pageid,)))
if not result:
self.untrack_page(cursor, pageid)
@@ -427,8 +427,8 @@ class Task(BaseTask):
base = title
ns = wiki.NS_MAIN

result = self.site.sql_query(query, (base, ns))
revid = list(result)[0]
result = self.site.sql_query(query, (base.replace(" ", "_"), ns))
revid = int(list(result)[0][0])

res = self.site.api_query(action="query", prop="revisions",
revids=revid, rvprop="content")


Caricamento…
Annulla
Salva