Ver código fonte

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

tags/v0.1^2
Ben Kurtovic 13 anos atrás
pai
commit
706299ee78
1 arquivos alterados com 3 adições e 3 exclusões
  1. +3
    -3
      bot/tasks/afc_statistics.py

+ 3
- 3
bot/tasks/afc_statistics.py Ver arquivo

@@ -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")


Carregando…
Cancelar
Salvar