返回提交历史
Modified
g4f/Provider/Yupp.py
+0
-1
Modified
g4f/gui/server/website.py
+3
-1
XFEstudio/gpt4free
Refactor Yupp provider to remove unused create_scraper import; update website rendering logic to improve static URL handling
bb1f8ca5
代码差异
2 个文件
+3
-2
@@ -10,7 +10,6 @@ from concurrent.futures import ThreadPoolExecutor
10
10
try:
11
11
import cloudscraper
12
12
from cloudscraper import CloudScraper
13
from cloudscraper import create_scraper
14
13
except ImportError:
15
14
CloudScraper = None
16
15
@@ -66,7 +66,9 @@ def render(filename = "home", download_url: str = GITHUB_URL):
66
66
cache_file += ".js"
67
67
html = response.text
68
68
html = html.replace("../dist/", f"dist/")
69
html = html.replace("\"dist/", f"\"{STATIC_URL}dist/")
69
html = html.replace("/dist/", f"dist/")
70
html = html.replace(f"{STATIC_URL}dist/", "dist/")
71
html = html.replace("dist/", f"{STATIC_URL}dist/")
70
72
# html = html.replace(JSDELIVR_URL, "/")
71
73
html = html.replace("{{ v }}", latest_version)
72
74
if is_temp: