From fa998cb97c3c975a86670ea21d0b3cc0822502c5 Mon Sep 17 00:00:00 2001 From: xmengnet <51263043+xmengnet@users.noreply.github.com> Date: Sat, 15 May 2021 18:59:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=90=9C=E7=B4=A2=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worker/pkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/pkg.py b/worker/pkg.py index 93ca57c..6e800dc 100644 --- a/worker/pkg.py +++ b/worker/pkg.py @@ -18,14 +18,14 @@ class Ans(StdAns): req = requests.get( url='https://archlinux.org/packages/search/json/?name=' + self.parms[1] ).json() if req['results'] == []: - req = requests.get(url='https://aur.archlinux.org/rpc/?v=5&type=search&arg=' + self.parms[1]).json() + req = requests.get(url='https://aur.archlinux.org/rpc/?v=5&type=info&arg=' + self.parms[1]).json() # print(req) if req['resultcount'] > 0: name = '包名:' + req['results'][0]['Name'] # pkgname = req['results'][0]['pkgname'] version = '版本:' + req['results'][0]['Version'] description = '描述:' + req['results'][0]['Description'] - maintainer = '维护:' + req['results'][0]['Maintainer'] + maintainer = '维护:' + str(req['results'][0]['Maintainer']) numvotes = '投票:' + str(req['results'][0]['NumVotes']) updatetime = req['results'][0]['LastModified'] updatetime = time.localtime(int(updatetime))