Pārlūkot izejas kodu

Fix tuple; fix encoding makeshift URLs.

tags/v0.1^2
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
964be6056e
2 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. +1
    -1
      earwigbot/wiki/category.py
  2. +2
    -1
      earwigbot/wiki/page.py

+ 1
- 1
earwigbot/wiki/category.py Parādīt failu

@@ -126,7 +126,7 @@ class Category(Page):
self.site.SERVICE_API: self._get_size_via_api,
self.site.SERVICE_SQL: self._get_size_via_sql
}
return self.site.delegate(services, (member_type))
return self.site.delegate(services, (member_type,))

@property
def size(self):


+ 2
- 1
earwigbot/wiki/page.py Parādīt failu

@@ -501,7 +501,8 @@ class Page(CopyrightMixIn):
if self._fullurl:
return self._fullurl
else:
slug = quote(self._title.replace(" ", "_"), safe="/:")
encoded = self._title.encode("utf8").replace(" ", "_")
slug = quote(encoded, safe="/:")
path = self.site._article_path.replace("$1", slug)
return ''.join((self.site.url, path))



Notiek ielāde…
Atcelt
Saglabāt