diff --git a/src/toolService.py b/src/toolService.py index bfde658336545d9a4240b0d44d32048cdb9bc38a..17f472683b8a4556e60c3a4889e0cf9a1ed07512 100644 --- a/src/toolService.py +++ b/src/toolService.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- import time import os -import requests class ToolService: def prt_content(self, content): @@ -12,7 +11,7 @@ class ToolService: flags = '*' * 30 print(f"{flags}\n{content}\n{flags}") - def split_string_to_list(self, data): + def gen_list(self, data): """ 将字符串按行分割成列表。 """ @@ -64,6 +63,7 @@ class ToolService: """ 检查URL是否有效。 """ + import requests try: response = requests.get(url, stream=True) return response.status_code == 200