diff --git a/plugins/README.md b/plugins/README.md index 5e27e56..53b13e1 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -51,7 +51,7 @@ try: # 处理响应数据 # ...... # 返回 -except requests.exceptions.RequestException as e: +except Exception as e: print(f"Error: {e}") return False ``` diff --git a/plugins/alist.py b/plugins/alist.py index b66beae..47c7029 100644 --- a/plugins/alist.py +++ b/plugins/alist.py @@ -108,7 +108,7 @@ class Alist: return data.get("data", []) else: print(f"Alist刷新: 存储{storage_id}连接失败❌ {data.get('message')}") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Alist刷新: 获取Alist存储出错 {e}") return [] @@ -177,6 +177,6 @@ class Alist: item["file_name"] for item in response["data"]["full_path"] ] return "/".join(file_names) - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Alist刷新: 获取Quark路径出错 {e}") return "" diff --git a/plugins/alist_strm.py b/plugins/alist_strm.py index 2e56e0a..28043ce 100644 --- a/plugins/alist_strm.py +++ b/plugins/alist_strm.py @@ -51,7 +51,7 @@ class Alist_strm: return True else: print(f"alist-strm配置运行: 匹配失败❌") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"获取alist-strm配置信息出错: {e}") return False @@ -77,6 +77,6 @@ class Alist_strm: return True else: print(f"🔗 alist-strm配置运行: 失败❌") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Error: {e}") return False diff --git a/plugins/alist_strm_gen.py b/plugins/alist_strm_gen.py index a98bb3c..0e3b636 100644 --- a/plugins/alist_strm_gen.py +++ b/plugins/alist_strm_gen.py @@ -122,7 +122,7 @@ class Alist_strm_gen: return data.get("data", []) else: print(f"Alist-Strm生成: 获取存储失败❌ {data.get('message')}") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Alist-Strm生成: 获取存储出错 {e}") return [] @@ -202,6 +202,6 @@ class Alist_strm_gen: item["file_name"] for item in response["data"]["full_path"] ] return "/".join(file_names) - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Alist-Strm生成: 获取Quark路径出错 {e}") return "" diff --git a/plugins/aria2.py b/plugins/aria2.py index 1b49cb6..6dbfae0 100644 --- a/plugins/aria2.py +++ b/plugins/aria2.py @@ -74,7 +74,7 @@ class Aria2: response = requests.post(self.rpc_url, json=jsonrpc_data) response.raise_for_status() return response.json() - except requests.exceptions.RequestException as e: + except Exception as e: print(f"Aria2下载: 错误{e}") return {} diff --git a/plugins/emby.py b/plugins/emby.py index 1223d02..ad05a95 100644 --- a/plugins/emby.py +++ b/plugins/emby.py @@ -53,7 +53,7 @@ class Emby: return True else: print(f"Emby媒体库: 连接失败❌ {response.text}") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"获取Emby媒体库信息出错: {e}") return False @@ -78,7 +78,7 @@ class Emby: return True else: print(f"🎞️ 刷新Emby媒体库:{response.text}❌") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"刷新Emby媒体库出错: {e}") return False @@ -111,6 +111,6 @@ class Emby: return item["Id"] else: print(f"🎞️ 搜索Emby媒体库:{response.text}❌") - except requests.exceptions.RequestException as e: + except Exception as e: print(f"搜索Emby媒体库出错: {e}") return ""