mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
escape aurname in url
This commit is contained in:
parent
fa927dbf50
commit
c3c16247b7
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import json
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from tornado.httpclient import AsyncHTTPClient
|
from tornado.httpclient import AsyncHTTPClient
|
||||||
|
from tornado.escape import url_escape
|
||||||
|
|
||||||
AUR_URL = 'https://aur.archlinux.org/rpc.php?type=info&arg='
|
AUR_URL = 'https://aur.archlinux.org/rpc.php?type=info&arg='
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
def get_version(name, conf, callback):
|
def get_version(name, conf, callback):
|
||||||
aurname = conf.get('aur') or name
|
aurname = conf.get('aur') or name
|
||||||
url = AUR_URL + aurname
|
url = AUR_URL + url_escape(aurname)
|
||||||
AsyncHTTPClient().fetch(url, partial(_aur_done, name, callback))
|
AsyncHTTPClient().fetch(url, partial(_aur_done, name, callback))
|
||||||
|
|
||||||
def _aur_done(name, callback, res):
|
def _aur_done(name, callback, res):
|
||||||
|
|
Loading…
Add table
Reference in a new issue