Procházet zdrojové kódy

Handle interwiki page titles correctly.

tags/v0.2
Ben Kurtovic před 9 roky
rodič
revize
6ae3cd6d08
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. +5
    -1
      earwigbot/wiki/page.py

+ 5
- 1
earwigbot/wiki/page.py Zobrazit soubor

@@ -211,8 +211,12 @@ class Page(CopyvioMixIn):
inprop="protection|url", rvprop="user", rvlimit=1,
rvdir="newer", titles=self._title)

res = result["query"]["pages"].values()[0]
if "interwiki" in result["query"]:
self._title = result["query"]["interwiki"][0]["title"]
self._exists = self.PAGE_INVALID
return

res = result["query"]["pages"].values()[0]
self._title = res["title"] # Normalize our pagename/title
self._is_redirect = "redirect" in res



Načítá se…
Zrušit
Uložit