Wikifetch: fix lookup of articles with symbols (e.g. "/") in their title

The normalization for the special cases was previously ignored if the query matched a "/"; why was this added in the first place?
This commit is contained in:
James Lu 2017-06-03 18:09:20 -07:00
parent b79ddf2f7e
commit 346f72d816

View File

@ -77,8 +77,6 @@ class Wikifetch(callbacks.Plugin):
# Different instances of MediaWiki use different URLs... This tries # Different instances of MediaWiki use different URLs... This tries
# to make the parser work for most sites, but still use resonable defaults # to make the parser work for most sites, but still use resonable defaults
# such as filling in http:// and appending /wiki to links... # such as filling in http:// and appending /wiki to links...
# Special cases: Wikia, Wikipedia, Wikimedia (i.e. Wikimedia Commons), Arch Linux Wiki
if '/' not in query:
baseurl = baseurl.lower() baseurl = baseurl.lower()
for match, suffix in self.SPECIAL_URLS.items(): for match, suffix in self.SPECIAL_URLS.items():
if match in baseurl: if match in baseurl: