From 7c7969beaf90cf11795b15c6213e78adf5217f2c Mon Sep 17 00:00:00 2001 From: Howyoung Date: Mon, 8 Mar 2021 16:04:32 +0800 Subject: [PATCH] Fix wrong URL --- tronclass_cli/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tronclass_cli/api/__init__.py b/tronclass_cli/api/__init__.py index 99539f5..ca50883 100644 --- a/tronclass_cli/api/__init__.py +++ b/tronclass_cli/api/__init__.py @@ -101,7 +101,7 @@ def get_activity(self, activity_id): return res.json() def get_document(self, ref_id, preview=False): - res = self._api_call(f'https://courses.zju.edu.cn/api/uploads/reference/document/{ref_id}/url', + res = self._api_call(f'api/uploads/reference/document/{ref_id}/url', params={'preview': str(preview).lower()}) res.raise_for_status() url = res.json()['url']