mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 【知识库】知识库使用tagname选择器,有部分页面没有导入数据
This commit is contained in:
parent
cc62c35995
commit
30a19a0ed2
|
|
@ -126,8 +126,13 @@ class Fork:
|
|||
|
||||
def fork(self):
|
||||
try:
|
||||
|
||||
headers = {
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36'
|
||||
}
|
||||
|
||||
logging.getLogger("max_kb").info(f'fork:{self.base_fork_url}')
|
||||
response = requests.get(self.base_fork_url, verify=False)
|
||||
response = requests.get(self.base_fork_url, verify=False, headers=headers)
|
||||
if response.status_code != 200:
|
||||
logging.getLogger("max_kb").error(f"url: {self.base_fork_url} code:{response.status_code}")
|
||||
return Fork.Response.error(f"url: {self.base_fork_url} code:{response.status_code}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue