Bladeren bron

Fix tuple; fix encoding makeshift URLs.

tags/v0.1^2
Ben Kurtovic 12 jaren geleden
bovenliggende
commit
964be6056e
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. +1
    -1
      earwigbot/wiki/category.py
  2. +2
    -1
      earwigbot/wiki/page.py

+ 1
- 1
earwigbot/wiki/category.py Bestand weergeven

@@ -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 Bestand weergeven

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



Laden…
Annuleren
Opslaan